필터 지우기
필터 지우기

lsim transfer function input

조회 수: 2 (최근 30일)
Alejandro Urbina
Alejandro Urbina 2016년 4월 28일
댓글: Star Strider 2016년 4월 29일
Im trying to input the following fourier series (x) signal into my transfer function (H) with respect to time (tttime) using the the lsim function using the following code.
R=220;
a=.95;
C=1/(2*pi*5000*R);
num=[(R^2.*C^2) 0 1];
den=[(R^2.*C^2) (4.*R.*C.*(1-a)) 1];
H=tf(num, den);
%%Fourier Series
%ttfreqs = kw_o
%ttspect = Ck values
%tttime = time samples in seconds
%ttsignal = input signal
XM = repmat(ttspect.',[1, length(tttime)]);
basis = exp(1i.*ttfreqs.'*tttime);
x = sum(XM.*basis);
%plot(tttime,x);
lsim (H,x,tttime);
matlab is saying i have an error on my last line of code, whats the problem in here?
any help would appreciate it
thanks!
  댓글 수: 2
Azzi Abdelmalek
Azzi Abdelmalek 2016년 4월 28일
It's not posible to test your code
Star Strider
Star Strider 2016년 4월 29일
What is the error?
What are the values of ‘x’ and ‘tttime’?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by