error in plotting clipped sinewave
이전 댓글 표시
K=1;
UpD=input('Enter value of alpha in radian =');
DwD=input('Enter value of gamma in radian =');
for t=0:0.000001:2*pi
if t<UpD
y=0;
elseif pi<t<DwD
y=0;
else
y=K*sin(t)
end
end
plot(t,y)
grid
title('Distorted signal wave')
xlabel('Phase angle in degree')
ylabel('y(wo)')
I am trying to plot clipped sinewave and I expect my output to be like in the figure below but instead I am getting blank

댓글 수: 1
Cris LaPierre
2020년 12월 19일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!