MATLAB: Counting plots on a graph

countplots on graph

x = 0:0.01:5; y = sin(2*pi*x); plot(x,y)
Hi, Is there a way for me to count the amount of points plotted on the graph from 0 – 5s or 0-2s for example?

Best Answer

Read about length and size. length(x) and size(x) should give you what yo want.