error in plotting clipped sinewave
Show older comments
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 Comment
Cris LaPierre
on 19 Dec 2020
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!