Conversion to double from tf is not possible
조회 수: 8 (최근 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!