Hi, I have the following signal, f(t) = sin(t), -(pi/2)<= t <= (pi/2), what is the code to plot it for three whole periods? Thank you for the help!

댓글 수: 1

Jimmy W
Jimmy W 2017년 4월 10일
편집: Walter Roberson 2017년 4월 10일
Basically I can only see one cycle after I plot it using these codes:
clc
clear all
x = linspace(-pi/2 , pi/2);
y = abs(sin(x));
plot(x,y);

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

 채택된 답변

Walter Roberson
Walter Roberson 2017년 4월 10일

0 개 추천

You defined -(pi/2)<= t <= (pi/2) . Your function does not have a definition outside of that one period, so it is not meaningful to plot it for multiple periods.
You could extend your definition:
x = linspace(-pi/2 , 5*pi/2);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Annotations에 대해 자세히 알아보기

태그

질문:

2017년 4월 10일

댓글:

2017년 4월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by