I want to make a continuous sine function
Show older comments
this code keeps plotting points but I want a smooth continuous line…How do I do that?
for x = -3*pi:pi/10:3*pi
if sin(x) > 0
y = sin(x);
else
y = 0;
end
plot(x, y);
end
Accepted Answer
More Answers (0)
Categories
Find more on Language Fundamentals in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!