필터 지우기
필터 지우기

How do I plot the periodic transmitted signal sin(t^2) with a period of 0:2pi?

조회 수: 1 (최근 30일)
Jamie  Chambers
Jamie Chambers 2017년 2월 16일
댓글: Star Strider 2017년 2월 16일
How do I plot the periodic transmitted signal sin(t^2) with a period of 0:2pi?
Thanks J

답변 (1개)

Star Strider
Star Strider 2017년 2월 16일
It’s not clear to me what you want.
See if this works for you:
t = linspace(0, 2*pi, 250);
s = sin(t.^2);
figure(1)
plot(t, s)
grid
  댓글 수: 2
Jamie  Chambers
Jamie Chambers 2017년 2월 16일
Ok thanks, that works but this is what I should have asked t = linspace(0, 2*pi, 250); s = (t.^2);
figure(1) plot(t, s) grid
So I've removed sin. it plots the correct signals but I need to repeat so it makes peaks,
Star Strider
Star Strider 2017년 2월 16일
That is straightforward to do:
t = linspace(0, 10*pi, 500); % Time Vector For 5 Cycles (5 * 2*pi)
tm = rem(t,2*pi); % Calculate ‘t mod(2*pi)’
s = @(t) t.^2; % Create Anonymous Function For Convenience
figure(1)
plot(t, s(tm)) % Plot
grid

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

카테고리

Help CenterFile Exchange에서 Pulse and Transition Metrics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by