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

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 Exchange에서 Get 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