If f is the figure handle, I wanted to use plot3(..) on it just like I would use plot(..), but this didn’t work:
>> plot3(f, t, real(Y), imag(Y))
Error using plot3
Vectors must be the same lengths.
Then I figured out that the way to do this is to:
-
First make the relevant figure current.
-
Then use the
plot3(..)function.
I can find what the current figure is using gcf, but how do I make a figure current (via its handle)?
This method has my personal preference:
because these commands are their own documentation. I find
and the like confusing on first read — do you create a new figure? or merely make an existing one active? -> more reading of the context is required.