Animated sequence of dots

8 views (last 30 days)
xav
xav on 20 Jul 2015
Commented: xav on 26 Jul 2015
Hello
I would like to know if Matlab can easily do this: set a animated sequence of dots that will appear at specific location on a 2 wire-frame surface or cube. The sequence will be generated with precise sequence or randomly etc. If it is possible is there any example of such sequence or what kind of code i should use?
see the image attached
Kind Regards and thanks
Xav
  3 Comments
Jan
Jan on 22 Jul 2015
The question is still not clear.
xav
xav on 24 Jul 2015
Edited: xav on 24 Jul 2015
Hello Jan i have attached an extra image that should make it clearer basically the dots will appear in a timed sequence 1, 2, 3 etc and loop again.

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 24 Jul 2015
If you have MATLAB R2014b or later, you can use animatedLine
For earlier versions you can use scatter() or plot(), updating the XData and YData properties as you go. For example,
x = []; y = [];
pointsize = 30;
h = scatter(x, y, pointsize, 'k');
for K = 1 : 20
newx = rand(); newy = rand();
x(end+1) = newx;
y(end+1) = newy;
set(h, 'XData', x, 'Ydata', y);
drawnow();
end
But my guess is that you might be looking for Psychophysics Toolbox
  1 Comment
xav
xav on 26 Jul 2015
thank you for tips, yes i will also be looking at Psychtoolbox-3 once i figured out how to make it work on Yosemite OS :)

Sign in to comment.

More Answers (0)

Categories

Find more on Animation in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!