you will provide both the code and snapshots of the generated output.
이전 댓글 표시
Assume that a signal x(t) has the following Fourier coefficients:
a_0=1
a_1=a_(-1)=1/4
a_2=a_(-2)=1/2
a_3=a_(-3)=1/3
These coefficients correspond to seven harmonic components of the signal x(t). Plot the harmonic components corresponding to k=0, k=1 and k=-1, k=2 and k=-2, k=3 and k=-3 , each on a separate graph. Finally, plot the signal x(t) as a sum of these harmonics.
댓글 수: 1
Marc
2013년 12월 27일
Sounds like homework. What have you done so far?
답변 (2개)
Sean de Wolski
2013년 12월 27일
Well in order to run the code and get snapshots along the way. Use the publish functionality. This can be found from the Editor's Publish tab or by running publish.
doc publish
For more info.
댓글 수: 2
Sean de Wolski
2013년 12월 27일
It says snapshots in the question title...
Image Analyst
2013년 12월 27일
The hints and code I gave should be sufficient. Anymore and I'd basically just be doing the whole thing for you. And I bet you're supposed to at least put in some effort yourself. Or is it allowable for your homework to just ask someone else to develop the complete solution for you and you turn in their work? I really can't add anymore without taking away any possibility that you'd be able to contribute anything.
Image Analyst
2013년 12월 27일
So start writing. You'll probably find these functions helpful: subplot(), plot(), sin(), cos(). Like
xFor1Term = sin(...... whatever
subplot(4,1,1);
plot(xFor1Term , 'r*-', 'LineWidth', 3);
grid on;
xFor2Term = sin(...... whatever
subplot(4,1,2);
plot(xFor2Term , 'r*-', 'LineWidth', 3);
grid on;
and so on.
댓글 수: 2
Sean de Wolski
2013년 12월 27일
doc subplot
Image Analyst
2013년 12월 27일
편집: Image Analyst
2013년 12월 27일
4 rows of plots, 1 column of plots. The third number is the plot number going from upper left to lower right. So if you had
subplot(5,4,10);
you would have 5 rows and 4 columns, or 20 possible plot locations. Then 10 means the 10th one, which is the third row, second one in from the left.
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
17 18 19 20
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!