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!

Réponses (1)

Image Analyst
Image Analyst le 1 Juil 2014

0 votes

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 commentaires

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 le 1 Juil 2014
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/

Connectez-vous pour commenter.

Catégories

En savoir plus sur Get Started with MATLAB dans Centre d'aide et File Exchange

Tags

Question posée :

le 1 Juil 2014

Commenté :

le 1 Juil 2014

Community Treasure Hunt

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

Start Hunting!

Translated by