how can i plot these dsp signals?
조회 수: 5 (최근 30일)
이전 댓글 표시
i tried plotting these signals and this is the code i've used but it's not quite right
n=[1:50];
S=2*(n.*(0.9).^n)
plot(S);
x=rand(1,50);
plot(x);
q=S + x;
plot(S,x);
please help me
댓글 수: 0
답변 (1개)
Rahul Kalampattel
2017년 3월 12일
I think what you have is correct, except in the last command you should be plotting q rather than S and x. Also if you want all the lines to appear on the same figure, you need to plot them together or hold the figure.
figure
hold on
n=1:50;
x=rand(size(n));
plot(x,'r');
S=2*(n.*(0.9).^n);
plot(S,'b--')
q = S+x;
plot(q,'r-.');
legend('x', 'S', 'q');
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Transforms and Spectral Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!