Conversion to double from tf is not possible
4 ビュー (過去 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 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!