본문내용
% sumation -3 ~ 3, -8 ~ 8, -50 ~ 50
if n==0, % c0 1/4 더하는 부분
exe = exp(i*n*(pi/2)*t);
znt = (1/4)*exe;
else
cn = (j./(2.*n.*pi)).*((-1).^n)+(1./(2.*n.^2.*pi.^2)).*((-1).^n -1); % cn 부분
exe = exp(i*n*(pi/2)*t); % exe 는 cn뒤 exp 부분
znt = cn * exe;
end
zt = zt + znt;
end
subplot(311), plot(t,xt,\'m\') , grid
xlabel(\'시간\',\'FontSize\', [18], \'Color\', \'r\'); % x축 시간
ylabel(\'함수 χ(t) n = -3 ~ 3\',\'FontSize\', [18], \'Color\', \'r\'); % y축 χ(t) ( n = -3 ~ 3 )
subplot(312), plot(t,yt,\'m\') , grid
xlabel(\'시간\',\'FontSize\', [18], \'Color\', \'r\'); % x축 시간
ylabel(\'함수 χ(t) n = -8 ~ 8\',\'FontSize\', [18], \'Color\', \'r\'); % y축 χ(t) ( n = -10 ~ 10 )
subplot(313), plot(t,zt,\'m\') , grid
xlabel(\'시간\',\'FontSize\', [18], \'Color\', \'r\'); % x축 시간
ylabel(\'함수 χ(t) n = -50 ~ 50\',\'FontSize\', [18], \'Color\', \'r\'); % y축 χ(t) ( n = -50 ~ 50 )
if n==0, % c0 1/4 더하는 부분
exe = exp(i*n*(pi/2)*t);
znt = (1/4)*exe;
else
cn = (j./(2.*n.*pi)).*((-1).^n)+(1./(2.*n.^2.*pi.^2)).*((-1).^n -1); % cn 부분
exe = exp(i*n*(pi/2)*t); % exe 는 cn뒤 exp 부분
znt = cn * exe;
end
zt = zt + znt;
end
subplot(311), plot(t,xt,\'m\') , grid
xlabel(\'시간\',\'FontSize\', [18], \'Color\', \'r\'); % x축 시간
ylabel(\'함수 χ(t) n = -3 ~ 3\',\'FontSize\', [18], \'Color\', \'r\'); % y축 χ(t) ( n = -3 ~ 3 )
subplot(312), plot(t,yt,\'m\') , grid
xlabel(\'시간\',\'FontSize\', [18], \'Color\', \'r\'); % x축 시간
ylabel(\'함수 χ(t) n = -8 ~ 8\',\'FontSize\', [18], \'Color\', \'r\'); % y축 χ(t) ( n = -10 ~ 10 )
subplot(313), plot(t,zt,\'m\') , grid
xlabel(\'시간\',\'FontSize\', [18], \'Color\', \'r\'); % x축 시간
ylabel(\'함수 χ(t) n = -50 ~ 50\',\'FontSize\', [18], \'Color\', \'r\'); % y축 χ(t) ( n = -50 ~ 50 )
소개글