Matlab question

  • #1

Main Question or Discussion Point

I have a small technical problem in MATLAB. I am trying to use comet to make an animated path of this spirograph program I've made. I'd also like to add some grid lines however my problem is the following. If i run the comet command everything looks great and works fine, but if I then use a "grid" or "grid on" command, my whole graph disappears. If I try either of the grid commands frist, they are instantly removed when the comet line runs. The only solution I have is to use the hold on command and run the program twice? Any suggestions?
 

Answers and Replies

  • #2
1,356
2
there' is a figure command to say hold so that you draw onto the previous graph...but you shouldn't have to run it twice. It should draw overlap.
 
  • #3
Clausius2
Science Advisor
Gold Member
1,435
5
neurocomp2003 said:
there' is a figure command to say hold so that you draw onto the previous graph...but you shouldn't have to run it twice. It should draw overlap.
type "help hold on" or "help hold".
 
  • #4
enigma
Staff Emeritus
Science Advisor
Gold Member
1,747
10
If you want to get even more technical (don't bother unless you want to do anything fancy), you can check out the set() and get() commands to learn how to adjust axis variables and settings.

For simple things, 'hold on' and 'hold off' should work fine.
 

Related Threads on Matlab question

  • Last Post
Replies
9
Views
6K
  • Last Post
Replies
8
Views
2K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
3
Views
6K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
10
Views
3K
Top