> ## Content Index
> Fetch the complete content index at: https://openlab.app/llms.txt
> Use this file to discover other available public pages before exploring further.

# Matlab Client: Install, Authenticate, and Run a Simulation
- URL: https://openlab.app/tutorial/run-a-simulation-from-matlab/
- Published: 2019-09-20T13:09:45.000Z
- Updated: 2020-10-27T10:11:29.000Z
- Description: A complete guide on how to get OpenLab up and running in Matlab
- Author: Andrew Holsæter
- Tags: Matlab, Simulation, Tutorial, #Import 2026-11-06 18:08

**NB:** The MatLab client will only communicate with OpenLab if you are using MatLab version 2016b or later.

You must also have a configuration created in the web browser client that you will run the drilling simulation on. For more info on this, check out our[ tutorials page](https://openlab.app/tutorials) and click the Configuration button.

## Download and Installation

The MatLab OpenLab client can be found in our [download section](https://openlab.app/downloads) or can be downloaded using this [link](https://downloads.openlab.app/Matlab.zip?ref=openlab.app). 

Once you have downloaded the client, simply unzip the contents and open the file `GetLoginData.m`. This file is where you will put your authentication credentials as described in the following section.

## Authentification

Unlike our Python client, the MatLab client requires all 3 user identification parameters. These are as follows:

- API Key
- Username/E-mail
- License ID

To generate these parameters:

1) Go to your `User settings` in the top right corner of https://live.openlab.app. 

2) Select which license you want to generate for (if multiple licenses)

3) Click `Generate Matlab login script`. 

![](https://openlab.app/content/images/2019/09/GenerateCredentials-Matlab-9.jpg)

A new API key will be generated, and a form should appear which will overwrite your old API key (if you had one). Copy this key and paste it in the correct place for the upcoming options.

![](https://openlab.app/content/images/2019/09/MatlabScriptGeneration.jpg)

Once you have copied this script, paste it into the `GetLoginData.m` that was opened in the earlier Download and Installation section.

## Run Example Simulation

Open the case file `FlowSweep_BHPControl.m` and enter the ConfigurationName for which you want to run the simulation on. **Again, this must be an existing well configuration that you have created using the OpenLab** [**web client**](https://live.openlab.app/?ref=openlab.app)**.**

Specify a new SimulationName or use the default given. This simulation name can be named anything (duplicates allowed) and will be visible in the browser when you start a simulation from MatLab.

Finally, run the case file `FlowSweep_BHPControl.m` in MatLab. The simulation will now be visible in the browser under the [Simulations tab](https://live.openlab.app/?ref=openlab.app#/simulations). You can click the corresponding simulation and view the streamed results as they happen, but you will not be able to give any setpoint inputs.