Filter löschen
Filter löschen

Matlab seem to forget the Control Systems Toolbox after restart

2 Ansichten (letzte 30 Tage)
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!

Akzeptierte Antwort

Arkadiy Turevskiy
Arkadiy Turevskiy am 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 Kommentar
Carl Brundin
Carl Brundin am 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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by