Matlab Directory Change

0

I would like to know how to solve this problem; I am using a function block inside Simulink, however when I click on execute my code the following error appears:

The current directory 'c: \ program files \ matlab \ matlab production server \ r2015a \ bin' is reserved for MATLAB files.

Please change your current directory to a writeable directory outside the MATLAB installation area. Component: Stateflow | Category: General error

Could you help me solve this problem?

I'm new here and very inexperienced in programming languages, I'm sorry if I was not so clear in my doubt.

    
asked by anonymous 07.12.2018 / 14:54

1 answer

0

This is normal depending on what you want to do in Matlab.

If you have no script or something, change the matlab directory to the same interface, either unix directly at the command prompt ( cd C:\Users\SEU_NOME ) or with the same mouse. Above your name is your default windows directory, but maybe use some other directory that you have created along with its path (for example C:\MEUS_TESTES\TESTE1 ).

If your simulation depends on the scripts and files you have created, transfer these files to the directory you want to run, change the directory in matlab (Matlab does this automatically depending on how you open and run the files) and start run from there. Beware of dependencies that you might have created, such as running simulations and asking to write to a specific directory or calling a file through the entire path.

One important point, Matlab automatically calls the functions of its library, but other functions or scripts that have been created must be in the same directory that is being run or in some folder that is in path of matlab. path is a list of directories that a system will automatically search for programs. Matlab has its own path that makes its libraries available, it can be changed in the configurations. I do not recommend to change path for anything, since its functions may take precedence over functions of the same name in the matlab library, and in the future this may cause problems.

If this has not been fixed, leave comments that I can try to see what the problem is.

    
07.12.2018 / 15:56