0
請幫我解決這個問題。我有兩個點'o'和'x'移動。我只想要'o'移動,'x'要保持不變。保持一個點不變,並在matlab圖中移動其他點
% animation_point.m
clear; close all;
% Create data
t = 0:0.001:1; % Time data
x = sin(2*pi*t); % Position data
y = cos(2*pi*t);
% Draw initial figure
figure(1);
set(gcf,'Renderer','OpenGL');
h = plot(x(1),0,'o', 0,y(1),'x');
set(h,'EraseMode','normal');
xlim([-1.5,1.5]);
ylim([-1.5,1.5]);
% Animation Loop
i = 1;
while i<=length(x)
set(h,'xData',x(i));
drawnow;
i = i+1
end
唷只更新一個變化
到
!太感謝了 ! – user3222664