Error with the DynamicSystem Toolbox

Hello there!
I have a problem! When I want to compute a Matlab example I get following error:
Example 4
Convert State-Space Model to Transfer Function
Compute the transfer function of the state-space model with the following data.
To do this, type
sys = ss([-2 -1;1 -2],[1 1;2 -1],[1 0],[0 1]);
tf(sys)
error:
>> sys = ss([-2 -1;1 -2],[1 1;2 -1],[1 0],[0 1]);
>> tf(sys)
Error using DynamicSystem/tf (line 9Cool
Undefined function 'xscale' for input arguments of type 'double'.
this happens only on my pc...what is the problem?
thanks for the help!

2 件のコメント

Craig
Craig 2012 年 11 月 29 日
This looks like it is an intstallation issue. I would recommend contacting technical support.
Thomas
Thomas 2012 年 12 月 4 日
it might be something with the command:
throw()
because i got a different error computing
>> mbuild -setup
Error using mbuild (line 189)
Unable to complete successfully.
this error refers as well to the throw() command

サインインしてコメントする。

 採用された回答

Ryan G
Ryan G 2012 年 12 月 4 日

0 投票

It appears that oyu have a 3rd party toolbox installed. The 'tf' function is usually part of the control system toolbox and it can handle what you have posted just fine. The error is pointing to a different tf function in the DynamicSystem (non MathWorks) toolbox.
I would suggest doing a
which -all tf
and seeing what tf functions are available. If there are others available you should use the MATLAB ones instead.

4 件のコメント

Thomas
Thomas 2012 年 12 月 4 日
and how can I choose one function?
thanks by the way!
Thomas
Thomas 2012 年 12 月 4 日
>> which -all tf
C:\Program Files\MATLAB\R2012b\toolbox\control\control\@tf\tf.m % tf constructor
C:\Program Files\MATLAB\R2012b\toolbox\control\control\@DynamicSystem\tf.m % DynamicSystem method
C:\Program Files\MATLAB\R2012b\toolbox\shared\controllib\engine\@StaticModel\tf.m % StaticModel method
C:\Program Files\MATLAB\R2012b\toolbox\dsp\filterdesign\@mfilt\tf.m % mfilt method
C:\Program Files\MATLAB\R2012b\toolbox\dsp\filterdesign\@adaptfilt\tf.m % adaptfilt method
C:\Program Files\MATLAB\R2012b\toolbox\ident\ident\@idParametric\tf.m % idParametric method
C:\Program Files\MATLAB\R2012b\toolbox\mpc\mpc\@mpc\tf.m % mpc method
C:\Program Files\MATLAB\R2012b\toolbox\signal\signal\@dfilt\tf.m % dfilt method
>> which tf
C:\Program Files\MATLAB\R2012b\toolbox\control\control\@tf\tf.m % tf constructor
Thomas
Thomas 2012 年 12 月 4 日
and it's the same functions as in my R2011b...and there i can compute the example above...
Ryan G
Ryan G 2012 年 12 月 5 日
It looks like it's pulling the correct default tf function. The dynamicsystem folder looks to be a subset of the control toolbox. Based on this output there should not be an issue.
You say you have 11b and 12b. Does it work in one and not the other?

サインインしてコメントする。

その他の回答 (1 件)

Sharath Aramanekoppa
Sharath Aramanekoppa 2014 年 3 月 18 日

0 投票

I faced the same error as well. I spoke to the the tech support and they told me that it was the toolbox path were changed. Resetting the path, solved the issue for me. Here are the commands to reset the path: * restore defaultpath * restordefaultpath * restoredefaultpath * rehash toolboxcache * savepath
Regards,
Sharath

カテゴリ

質問済み:

2012 年 11 月 28 日

回答済み:

2014 年 3 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by