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
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
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
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에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!