Prev: how to define conditional formating function of excel in MATLAB?
Next: link to cadence in matlab
From: W. eWatson on 15 Feb 2010 12:53 I've been told by an experienced ML user that it's possible to produce a dynamic line plot. A line is drawn, and then there's a pause of say 0.2 sec. Another line with a pause. The line moves across the screen. Here's my problem. I'm using ML release 14 and haven't used it in 5 years. matplotlib in Python provides a close approx to ML. When I try the "same" thing there, the figure graphic appears, and then suddenly the axes but without a plot except for three markers I've put on the screen and the axes. I have a feeling I'm missing the boat on something. Could this be in ML the interactive mode?
From: Steven Lord on 15 Feb 2010 23:14 "W. eWatson" <wolftracks(a)invalid.com> wrote in message news:hlc1ng$22d$1(a)news.eternal-september.org... > I've been told by an experienced ML user that it's possible to produce a > dynamic line plot. A line is drawn, and then there's a pause of say 0.2 > sec. Another line with a pause. The line moves across the screen. Sure. % Fix the axes limits axis([-1 11 -1 122]) % Plot the initial line h = line([0 1 1 0 0], [0 0 1 1 0]); for k = 0:0.1:10 % Update the properties of the initial line to 'move' it set(h, 'XData', [k k+1 k+1 k k], ... 'YData', [k k (k+1).^2 (k+1).^2 k]); % and wait for a little bit -- you may want to use DRAWNOW instead pause(0.2) end -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
|
Pages: 1 Prev: how to define conditional formating function of excel in MATLAB? Next: link to cadence in matlab |