how to pass php dynamic file path to matlab(any function where I can execute matlab file code). Want to show the output on browser. SO, how can I code for this.
MATLAB: Wants to execute matlab file with php
image processingPHP
Related Solutions
How you create a shortcut to MATLAB depends on your operating system. Regardless of operating system you will need to know where MATLAB is located before you can create a shortcut. See “<http://www.mathworks.com/matlabcentral/answers/92048 How do I launch MATLAB?>“ for help finding MATLAB.
Windows
You can create a shortcut to the desktop or you can add MATLAB to your Start Menu.
- To create a shortcut, right-click on matlab.exe and select “Send to >” and then select “Desktop (create shortcut)”.
- To add MATLAB to the Start Menu, right-click on matlab.exe and select “Pin to start.”
macOS
You can add MATLAB to your Dock or you can create an alias.
- To add MATLAB to your Dock, simply drag the application onto the Dock and wait until the other icons make room for the MATLAB icon. Then release the MATLAB icon.
- To create an alias, right-click or control-click MATLAB in your application folder and select “Make Alias.” The alias will be created in the same folder MATLAB is in, so you need to move it to where you want it to be.
Linux
You can create a symbolic link for MATLAB in /usr/local/bin/ so you can run MATLAB from anywhere. To do so, start by moving into /usr/local/bin:
cd /usr/local/bin
Then create the link with the ln -s command. For example, if you are using R2016b, run this command:
ln -s /usr/local/MATLAB/R2016b/bin/matlab matlab
This will allow you to run MATLAB from anywhere on your system without needing to first navigate to the MATLAB installation directory.
If you are on a Linux distribution that can use Desktop shortcuts, then please consult your distribution's instructions for creating a shortcut.
So the command that's being executed looks like it is:
submittedmatlab -sd F:\MATLAB\matlab2020\bin\matlab.exe -r knn_func(1, 1, 1,1)
I understand why you're receiving this error, but there's also another thing odd about this command.
Assuming submittedmatlab is a command to launch MATLAB using the executable and pass some startup options into it, the value for the -sd option should be the directory in which MATLAB should start rather than the full path of the executable.
The value that's being specified for the -r startup option as the code to be executed is "knn_func(1," [quotes added to distinguish where the command ends from where the sentence ends.]. The space ends the command since it is not enclosed in quotes. Try wrapping that call in quotes as per the example for the -r option using disp on this documentation page. Alternately you might want to use the -batch option instead (with the quotes as well.)
submittedmatlab -sd F:\MATLAB\matlab2020\bin\matlab.exe -r 'knn_func(1, 1, 1,1)'
Best Answer