Effacer les filtres
Effacer les filtres

Matlab seem to forget the Control Systems Toolbox after restart

2 vues (au cours des 30 derniers jours)
Carl Brundin
Carl Brundin le 13 Mai 2016
Commenté : Carl Brundin le 18 Mai 2016
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!

Réponse acceptée

Arkadiy Turevskiy
Arkadiy Turevskiy le 16 Mai 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 commentaire
Carl Brundin
Carl Brundin le 18 Mai 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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by