Conversion to double from tf is not possible

4 ビュー (過去 30 日間)
md
md 2014 年 4 月 8 日
コメント済み: md 2014 年 4 月 11 日
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.....

採用された回答

Walter Roberson
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.
  1 件のコメント
md
md 2014 年 4 月 11 日
@ Walter Roberson, Thanks boss....its working....

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFilter Design についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by