I have a graph with a lot of points and I want to be able to look at certain intervals using xlim. The issue is, when I increment the interval, I have to rerun my program. This is taking a lot of processing power.
So basically, I make graph using plot, then use xlim. I don't want to keep doing this. Is there a way to plot only certain intervals using plot? That way, MATLAB doesn't have to process the whole vector.
For example
A=[1,2,3,4]
and
B=[1,2,3,4]
If I do plot(A,B) then xlim(1,2) it would plot the graph first and then limit the interval. This takes a lot of processing power if you imagine a really massive complicated graph, thus I don't want to use plot using the normal method.
Is there a way to plot the graph on the interval x=[1,2] with only one function?
plot(A(1:2), B(1:2))? - Adam