Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Matlab drawnow性能/绘图速度_Matlab_Drawnow - Fatal编程技术网

Matlab drawnow性能/绘图速度

Matlab drawnow性能/绘图速度,matlab,drawnow,Matlab,Drawnow,我正在绘制一个数据集来创建滞后回线。我同意之前的绘图速度,但由于我添加了分散,它变得非常慢 散布向当前打印的数据点添加一个标记,这样,如果打印覆盖,您仍然可以追踪动画线 这是我的密码: hAL = animatedline; % line handle hAL.LineStyle='-'; hAL.Color='blue'; % defaults for the marker hAx=gca; % get the axis handle sz=10; % size of

我正在绘制一个数据集来创建滞后回线。我同意之前的绘图速度,但由于我添加了分散,它变得非常慢

散布向当前打印的数据点添加一个标记,这样,如果打印覆盖,您仍然可以追踪动画线

这是我的密码:

hAL = animatedline;  % line handle
hAL.LineStyle='-';
hAL.Color='blue';
% defaults for the marker
hAx=gca;      % get the axis handle
sz=10;        % size of marker
clr='b';      % color
hS=scatter(hAx,nan,nan,sz,clr);  % initial point won't show but creates handle
x = mmatrix(:,2);
y = mmatrix(:,1);
for k = 1:length(x)
  addpoints(hAL,x(k),y(k));
  set(hS,'xdata',x(k),'ydata',y(k))  % update the marker position
  drawnow
end
您知道调节打印速度的选项吗? 我尝试了
drawnow limitrate
,但速度太快了


关于jw

什么是
mmatrix
mmatrix
是绘图的数据集,包含磁滞回线绘图的
Sig Eps
值。请参见:如果要减慢速度,可以在
绘图后立即放置
暂停(0.1)
之类的内容。(使暂停输入变小将加快渲染速度,而使其变大将降低渲染速度。)是的。我在
drawnow limitrate
之后添加暂停。真管用!