How do I join the data points?
1 view (last 30 days)
Show older comments
Hi,
I am given a problem where I have to plot the orbit of a function cos(x). I want to join the data points so that a line goes through each point.
Here is my code:
function cos_orbit(x, N)
for i = 1:N
y = cos(x);
hold on
plot(i, x, 'b.')
x = y;
hold off
end
0 Comments
Answers (1)
See Also
Categories
Find more on Earth and Planetary Science 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!