need to generate a signal as attached.

조회 수: 1 (최근 30일)
LAKSHMAN
LAKSHMAN 2014년 8월 28일
댓글: Star Strider 2014년 9월 1일
Hi all,
I will get my input samples as shown in attached figure.
So to check with that, i need to generate the samples as shown in attached figure.
It has samples with unequal spacing and unequal amplitudes.
I need to generate a signal like the attached figure.
Could anyone plz help me out in generating the signal as shown in attached figure.
  댓글 수: 1
LAKSHMAN
LAKSHMAN 2014년 9월 1일
Plz help me on generating this kind of signal..

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

채택된 답변

Star Strider
Star Strider 2014년 9월 1일
편집: Star Strider 2014년 9월 1일
It looks like a mass spec or something similar. To create a realistic version, you’d have to know the process that created it, and have some sort of model.
If you just want a random simulation, this will work:
x = 0:399;
xp = sort(randi(400, 1, 19));
y = zeros(1,400);
y(xp) = rand(1, 19)*3;
figure(1)
plot(x, y, '-r')
text(xp,y(xp), cellstr(strsplit(num2str(1:19,'%d '),' '))) % Add Numbers To The Peaks
NOTE: Any resemblance to an actual mass spec (or whatever your plot is) is entirely coincidental!
  댓글 수: 2
LAKSHMAN
LAKSHMAN 2014년 9월 1일
Thanks for the reply..
Star Strider
Star Strider 2014년 9월 1일
My pleasure!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Signal Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by