Conversion to double from tf is not possible
7 次查看(过去 30 天)
显示 更早的评论
Hi I am new in Matlab...... i am working on suspension system..so I need to filter my acceleration found from random input. I am using 2nd order butter worth filter. Here is the code i tried....
ts = 0.001; t = 0:ts:10; n=2; Fs=1000; w=.10; z=.7;(the value of parameter)
num=[1/w^2];
den=[1/w^2 2*z*w 1];
sys=tf(num,den);
filter= sys*y3;% (here y3 means the equation of the acceleration found after input random track input)
Now then I tried to plot the result...like this way...
subplot(2,1,1), plot(t,y3),title('passive_ acceleration')
subplot(2,1,2), plot(t,filter), title('filtered_ acceleration')
Then it shows that 'Conversion to double from tf is not possible'....Please help me...I am stuck here badly.....
0 个评论
采纳的回答
Walter Roberson
2014-4-8
You should be using the filter() call to filter your data; see http://www.mathworks.com/help/signal/ug/filter-implementation-and-analysis.html#f1-821
It is not advisable to use "filter" as the name of a variable, as that will interfere with calling the filter() function.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Filter Design 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!