Difference between revisions of "How Do I Configure the Matlab Interface?"
Line 8: | Line 8: | ||
For step 2 (required for MATLAB versions 2009b and over), we need to know whether the 32-bit or 64-bit version of MATLAB is installed. We also need to know the path to the Matlab installation (e.g. ''"C:\Program Files\MATLAB\2009b\"''). | For step 2 (required for MATLAB versions 2009b and over), we need to know whether the 32-bit or 64-bit version of MATLAB is installed. We also need to know the path to the Matlab installation (e.g. ''"C:\Program Files\MATLAB\2009b\"''). | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Line 29: | Line 22: | ||
* Under ''"System variables"'' click on the ''"Path"'' variable and then click ''"Edit"''. In the resulting dialog, enter a semicolon (;) at the end of the path string, and add the path after the semicolon. | * Under ''"System variables"'' click on the ''"Path"'' variable and then click ''"Edit"''. In the resulting dialog, enter a semicolon (;) at the end of the path string, and add the path after the semicolon. | ||
* Click ''"OK"'' to close and save the path variable. Click ''"OK"'' to close the ''"System Properties"'' dialog. When using Windows Vista/7/8, you will also need to close the ''"Control Panel"'' window afterwards. | * Click ''"OK"'' to close and save the path variable. Click ''"OK"'' to close the ''"System Properties"'' dialog. When using Windows Vista/7/8, you will also need to close the ''"Control Panel"'' window afterwards. | ||
+ | |||
+ | <div><ul> | ||
+ | <li style="display: inline-block;"> [[File:SystemProperties.png|thumb|340px|Figure 1 Advanced system settings]] </li> | ||
+ | <li style="display: inline-block;"> [[File:EnvironmentVariables.png|thumb|300px|Figure 2 Environment variables]] </li> | ||
+ | <li style="display: inline-block;"> [[File:EditSystemVariable.png|thumb|250px|Figure 3 Edit system variable]] </li> | ||
+ | </ul></div> | ||
+ | |||
== Additional configuration == | == Additional configuration == | ||
− | ( | + | (Only required after a change of your MATLAB configuration after installation of BESA Research) |
− | During the installation process of BESA Research, the program "SetupBesaMatlabInterface.exe" in the BESA Research root folder was executed. Run this program again when your MATLAB configuration has changed, e.g. after updating your MATLAB version. | + | During the installation process of BESA Research, the program "<span style="color:#ff9c00;">SetupBesaMatlabInterface.exe</span>" in the BESA Research root folder was executed. Run this program again when your MATLAB configuration has changed, e.g. after updating your MATLAB version. |
In the dropdown list, select the Matlab version that you are using. This program performs two operations: | In the dropdown list, select the Matlab version that you are using. This program performs two operations: | ||
− | * it copies the appropriate interface Dll to the BESA Research root folder and renames it to "BesaMatlab.dll" (32-bit version) or "BesaMatlab64.dll" (64-bit version), and | + | * it copies the appropriate interface Dll to the BESA Research root folder and renames it to "<span style="color:#ff9c00;">BesaMatlab.dll</span>" (32-bit version) or "<span style="color:#ff9c00;">BesaMatlab64.dll</span>" (64-bit version), and |
− | * if you are using a 64-bit version it creates an entry in BESA.ini as follows: | + | * if you are using a 64-bit version it creates an entry in <span style="color:#ff9c00;">BESA.ini</span> as follows: |
+ | |||
<source lang="dos"> | <source lang="dos"> | ||
[Matlab] | [Matlab] | ||
Line 52: | Line 53: | ||
* After the window closes, open the Matlab window, and type "Workspace" to open the workspace window, or "Desktop" to open the standard Matlab desktop. | * After the window closes, open the Matlab window, and type "Workspace" to open the workspace window, or "Desktop" to open the standard Matlab desktop. | ||
* Examine the "besa_channels" variable, which contains the data for the marked data segment. | * Examine the "besa_channels" variable, which contains the data for the marked data segment. | ||
+ | |||
+ | <div><ul> | ||
+ | <li style="display: inline-block;"> [[File:SendToMatlab.png|thumb|400px|Figure 4 Send marked segment to Matlab]] </li> | ||
+ | <li style="display: inline-block;"> [[File:SendToMatlabProgressbar.png|thumb|200px|Figure 5 Send to Matlab progress bar]] </li> | ||
+ | <li style="display: inline-block;"> [[File:ExportedMatlabStructure.png|thumb|300px|Figure 6 Data exported from BESA Research to Matlab]] </li> | ||
+ | </ul></div> | ||
== Troubleshooting if the interface is not working after the above steps == | == Troubleshooting if the interface is not working after the above steps == | ||
− | If the File / Send to MATLAB... menu item is not shown, this means that either the path (step 2 above) is not defined properly, or that the interface Dll BesaMatlab.dll or BesaMatlab64.dll is not compatible with the currently installed version of Matlab. | + | If the File / Send to MATLAB... menu item is not shown, this means that either the path (step 2 above) is not defined properly, or that the interface Dll (BesaMatlab.dll or BesaMatlab64.dll) is not compatible with the currently installed version of Matlab. |
+ | |||
[[Category:Setup]] | [[Category:Setup]] |
Revision as of 08:36, 22 June 2017
Module information | |
Modules | BESA Research Basic or higher |
Version | 5.2 or higher |
Contents
MATLAB must be installed
For step 2 (required for MATLAB versions 2009b and over), we need to know whether the 32-bit or 64-bit version of MATLAB is installed. We also need to know the path to the Matlab installation (e.g. "C:\Program Files\MATLAB\2009b\").
PATH environment variable
For versions 2009b and over, make sure that the path to the Win32 or Win64 folder in the MATLAB installation to the "PATH" environment variable is defined:
- The path for the 64-bit version for Matlab 2009b is typically "C:\Program Files\MATLAB\R2009b\bin\win64". For the 32-bit version, the path is typically "C:\Program Files\MATLAB\R2009b\bin\win32".
- Open the "System Properties" dialog by holding down the "Windows" key and pressing the "Pause" key at the same time.
- In XP, the dialog is opened directly.
- In Vista and Window 7, the key combination opens the "System Display". Click on the link "Change Settings".
- In Windows 8, the key combination also opens the "System Display". Click on the link "Advanced system settings". Skip the step in this description, as you have already chosen the advanced settings.
- Select the "Advanced" tab.
- Press the "Environment Variables" button.
- Under "System variables" click on the "Path" variable and then click "Edit". In the resulting dialog, enter a semicolon (;) at the end of the path string, and add the path after the semicolon.
- Click "OK" to close and save the path variable. Click "OK" to close the "System Properties" dialog. When using Windows Vista/7/8, you will also need to close the "Control Panel" window afterwards.
Additional configuration
(Only required after a change of your MATLAB configuration after installation of BESA Research)
During the installation process of BESA Research, the program "SetupBesaMatlabInterface.exe" in the BESA Research root folder was executed. Run this program again when your MATLAB configuration has changed, e.g. after updating your MATLAB version.
In the dropdown list, select the Matlab version that you are using. This program performs two operations:
- it copies the appropriate interface Dll to the BESA Research root folder and renames it to "BesaMatlab.dll" (32-bit version) or "BesaMatlab64.dll" (64-bit version), and
- if you are using a 64-bit version it creates an entry in BESA.ini as follows:
[Matlab] Platform=64
Testing
- Start BESA Research and check if Send to MATLAB is displayed in the File menu. If it is, the interface is set up correctly. (Note that the item will be grayed if no file is open in BESA Research.)
- Test the interface: open a data file, mark a short (e.g. 1 s) time range, and select File / Send to Matlab to open the Export Dialog:
- The Matlab window should open, and BESA Research will display a progress bar:
- After the window closes, open the Matlab window, and type "Workspace" to open the workspace window, or "Desktop" to open the standard Matlab desktop.
- Examine the "besa_channels" variable, which contains the data for the marked data segment.
Troubleshooting if the interface is not working after the above steps
If the File / Send to MATLAB... menu item is not shown, this means that either the path (step 2 above) is not defined properly, or that the interface Dll (BesaMatlab.dll or BesaMatlab64.dll) is not compatible with the currently installed version of Matlab.