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!

Risposte (1)

Image Analyst
Image Analyst il 1 Lug 2014

0 voti

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 Commenti

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.
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/

Accedi per commentare.

Categorie

Scopri di più su Get Started with MATLAB in Centro assistenza e File Exchange

Tag

Richiesto:

il 1 Lug 2014

Commentato:

il 1 Lug 2014

Community Treasure Hunt

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

Start Hunting!

Translated by