how do i plot this?

x(t)=summation(k=1)^infinity . [(-1)]^(k-1).(2A/k.pi).sin(k.pi.t)

 채택된 답변

Matt Fig
Matt Fig 2011년 4월 2일

1 개 추천

What is A?
Try this:
function x = inf_sum(t,A)
k = 1:200;
[k,t] = meshgrid(k,t);
x = ((-1).^(k-1).*((2*A)./(k*pi)).*sin(k.*pi.*t));
x = sum(x,2);
Then from the command-line you do this:
A = 4;
t = 0:.1:10;
plot(t,inf_sum(t,A))
I have a feeling, however, that your A is a Fourier Coefficient, thought you seem to leave no confirmation of this. If that is true you will also need to calculate A in the function.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

태그

질문:

2011년 4월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by