Saking
Saking

Reputation: 100

How to control the time of displaying of a figure?

Now, I am trying to use Matlab for simulating a motion. Here is a part of the program:

L=line(x, y, 'color','k','erasemode','xor');
rotate(L,[0 0 1],90,[0 0 0]);

Here is my problem: I want the line to show after the rotate command, not the line function, what functions I should use to obtain the desired results?

Upvotes: 1

Views: 30

Answers (1)

hitzg
hitzg

Reputation: 12701

Try this:

L = line([1 2],[3 4], 'color','k', 'visible', 'off');
rotate(L,[0 0 1],90,[0 0 0]);
set(L, 'visible', 'on');

(I replaced x and y by some random numbers to make the code work)

Upvotes: 2

Related Questions