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
之后添加暂停。真管用!