필터 지우기
필터 지우기

How can i plot this signal?

조회 수: 70 (최근 30일)
mskumarsajeesh mskumar
mskumarsajeesh mskumar 2012년 8월 11일
I have a signal like this v=240*sin(2*pi*f(t)*t) where f(t)=50+sin(t). My sampling frequency is 7500 Hz.How can i plot the above mentioned signal?I am getting an error while plotting.Expecting reply.

답변 (3개)

Matt Fig
Matt Fig 2012년 8월 11일
편집: Matt Fig 2012년 8월 11일
f = @(t) 50+sin(t);
v = @(t) 240*sin(2*pi*t.*f(t));
t = 0:.001:1;
plot(t,v(t))

Image Analyst
Image Analyst 2012년 8월 11일
편집: Image Analyst 2012년 8월 11일
Did you try the straightforward, obvious approach that just uses your equations to get f and then v?
% Get the times between 1 andnumberOfSeconds, inclusive:
% (Adjust parameters as needed.)
numberOfSeconds = 9
samplingRate = 7500 % Samples per second.
numberOfSamples = samplingRate * numberOfSeconds
t = linspace(0, numberOfSeconds, numberOfSamples);
% Get f:
f =50 + sin(t);
% Get v:
v = 240 * sin(2*pi*f .* t);
% Plot:
plot(t, v);
% Enlarge figure to full screen.
set(gcf, 'units','normalized','outerposition',[0 0 1 1]);
  댓글 수: 2
Matt Fig
Matt Fig 2012년 8월 11일
That picture is misleading. Try with
linspace(1,4*pi,8000);
Then again with 80000!
Image Analyst
Image Analyst 2012년 8월 11일
Yeah, I know there's aliasing going on, but when I did it with just a few hundred samples, it looked like just a normal sine wave.

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


Azzi Abdelmalek
Azzi Abdelmalek 2012년 8월 11일
편집: Azzi Abdelmalek 2012년 8월 11일
te=1/7500;
t=0:te:500*te;
f=50+sin(t);
v=240*sin(2*pi*f.*t);
plot(t,v)
  댓글 수: 3
Azzi Abdelmalek
Azzi Abdelmalek 2012년 8월 11일
his sampling frequency is 7500Hz that means a sample time is 1/7500 s
Matt Fig
Matt Fig 2012년 8월 11일
Much nicer!

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

카테고리

Help CenterFile Exchange에서 Matched Filter and Ambiguity Function에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by