Azzera filtri
Azzera filtri

Matlab seem to forget the Control Systems Toolbox after restart

2 visualizzazioni (ultimi 30 giorni)
My script uses the tf-function, so I installed the Control Systems Toolbox. All is fine until I restart my computor. After that, Matlab gives me this error message: Undefined function or variable 'tf'.
I reinstalled Control Systems Toolbox again, and got the script going again, until I restart my computor - Again the same error message: Undefined function or variable 'tf'.
Is there another way of solving this problem? Path problem?
I use the 64-bit Matlab version R2016a.
Please help!

Risposta accettata

Arkadiy Turevskiy
Arkadiy Turevskiy il 16 Mag 2016
It seems like a problem with the path, not sure why it is happening. You can try explicitly adding the folder where Control System Toolbox in installed to your MATLAB path and saving it.
Check where Control System Toolbox is installed. For example you can do this
>>which tf
For me this returns: C:\Program Files\MATLAB\R2016a\toolbox\control\ctrlmodels\@tf\tf.m % tf constructor
Now you need to add the folder where Control System Toolbox is installed, and all subfolders added to the path:
>>addpath(genpath('C:\Program Files\MATLAB\R2016a\toolbox\control'));
Now save the path for future sessions:
>>savepath
HTH. Arkadiy
  1 Commento
Carl Brundin
Carl Brundin il 18 Mag 2016
Thx!!!
The first which-command did not work of course, but there were no paths to the control-map you helped me to find!
So I followed your instructions and now it works! :D

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by