Matlab seem to forget the Control Systems Toolbox after restart

2 次查看(过去 30 天)
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!

采纳的回答

Arkadiy Turevskiy
Arkadiy Turevskiy 2016-5-16
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 个评论
Carl Brundin
Carl Brundin 2016-5-18
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

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by