Conv error / frequency domain error

Hello,
A friend of mine provided me with some code to help me learn control design. However, he wrote it in a previous version of Matlab and now the following code is giving me errors. I have used the "tf" command many times and I am not sure why it isn't working now...
Tdel = 1/5; wdel = 2*pi/Tdel; s = tf('s'); Cds = wdel*eye(4)/(s+wdel);
Which gives me this error message:
Error using + (line 63) Undefined function 'conv' for input arguments of type 'double'.
Error in Investigation (line 4) Cds = wdel*eye(4)/(s+wdel);
Any insight would be appreciated!

回答 (1 件)

Image Analyst
Image Analyst 2014 年 7 月 1 日

0 投票

I don't see the call to conv() in your code. But anyway, maybe you're passing in a uint8 array or something. Just cast the arrays to double like it asked you to and it should work.

2 件のコメント

Image Analyst
Image Analyst 2014 年 7 月 1 日
Bryce's "Answer" moved here:
That's the thing, I don't call a conv(). I've run this exact code in 2012 & 2013 with no issue. You can get rid of everything but the following:
s = tf('s'); Cds = s+5;
and you get the same error "Undefined function 'conv' for input arguments of type 'double'."
It's like it is choking on the numerical and Laplace summation.
Image Analyst
Image Analyst 2014 年 7 月 1 日
Set a breakpoint on line 63 and see what the values are. Do you know how to use the debugger? http://blogs.mathworks.com/videos/2012/07/03/debugging-in-matlab/

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

カテゴリ

ヘルプ センター および File ExchangeGet Started with MATLAB についてさらに検索

タグ

質問済み:

2014 年 7 月 1 日

コメント済み:

2014 年 7 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by