×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

plot a graph in real time

plot a graph in real time

plot a graph in real time

(OP)
Hi!
Sorry for my english.
I'm working about the phenomena of "random walker", that is a object that walk random in one dimension. I have made the algorithm of the random walkers and i save the results on a matrix S(num,N), where num is the number of random walker and N is the number of iterations on the time. Now i have to show the walk on the window and i have tryed with this cycle:

while k <= N
.
.
plot(k,S(:,k), ...
'EraseMode','none',...
'MarkerSize',6);
drawnow
.
.
k=k+1;
end

The problem are that plot only a point on the window each iteration(k) but i would a continuous line!!
Please help me!

RE: plot a graph in real time

The way I could see doing it is to create a vector, add the new value at each iteration, then plot that vector at the end of the iteration

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources