How to locate Matlab installation?
I need to locate my MATLAB installation. I find out that I need to type matlabroot
at the MATLAB command prompt.
As I understand MATLAB command prompt means open cmd at the root where matlab is installed. I find such root: C:\my_app\app\mcr\v717\bin
. But when I run matlabroot
from this directory - get 'matlab' is not recognized as an internal or external command,
operable program or batch file.
Could someone advise me how to locate matlab installation in right way?
Solution 1:
It's a regular Matlab function. You should type it in Command Windows inside Matlab.
http://www.mathworks.com/help/matlab/ref/matlabroot.html
>> matlabroot
ans =
C:\Program Files\MATLAB\R2009a
Solution 2:
Are you sure you actually do have MATLAB installed?
You refer to a directory C:\my_app\app\mcr\v717\bin
. This directory is not typical of a MATLAB installation - instead, it's typical of where you might install an application that has been created with MATLAB Compiler.
In case you're not familiar with that, MATLAB Compiler is an add-on product for MATLAB, that allows you to create standalone applications from MATLAB code. These applications are distributed along with a MATLAB runtime (the MATLAB Compiler Runtime, or MCR, which is what you see in the directory path you have), and they run without you needing to have MATLAB installed.
Can you actually start MATLAB itself, either from the Windows command line with the command matlab
, or from an icon? If so then, as others have suggested, when MATLAB starts it should have its own command line. If you type matlabroot
into that command line it should give you the location of the MATLAB installation.
If you can't start MATLAB itself, then I would suggest that you don't actually have MATLAB itself installed, but perhaps instead have an application produced with MATLAB Compiler.