Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com May 7 '13 at 8:37

This question came from our site for professional and enthusiast programmers.

2  
It means open Matlab and type matlabroot inside matlab I would think –  Dan May 7 '13 at 8:06
    
using matlab command window for run matlab command , if it isn't visible you can find that in matlab desktop menu in view menu –  mojtaba May 7 '13 at 8:20

2 Answers 2

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
share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.