3
함수 dx/dt의 애니메이션을 플로팅하고 축을 설정했지만 애니메이션이 실행되면 축이 플롯에 따라 동적으로 변경됩니다. 이 문제를 어떻게 수정합니까?Matlab에서 애니메이션을 플롯 할 때 축이 동적으로 변경되지 않게하려면 어떻게해야합니까?
clear all;
%Equation variables:
s = 0;
r = 0.4;
%axes limits:
xmin = 0;
xmax = 2;
ymin = -.05;
ymax = .2;
%s limits:
smin = 0;
smax = 1;
s_steps = 100;
%our x-space:
x = linspace(xmin, xmax, 100);
%Let's try different s-values and plot as an animation:
for s=linspace(smin, smax, s_steps)
counter = counter + 1;
%dx/dt:
dxdt = s - r.*x + (x.^2)./(1 + x.^2);
figure(1),
subplot(2,1,1)
axis([xmin xmax ymin ymax]);
plot(x, dxdt);
title(strcat('S-value:', num2str(s)));
hold on;
y1 = line([0 0], [ymin ymax], 'linewidth', 1, 'color', [0.5, 0.5, 0.5], 'linestyle', '--');
x1 = line([xmin xmax], [0 0], 'linewidth', 1, 'color', [0.5, 0.5, 0.5], 'linestyle', '--');
hold off;
end
을 나는이 "사각형"및 "입력"또는 "축 동일하게"사용 "축 같은 명령과 같은 경우이다 플롯보다 다른 추가해야한다고 생각 ([ xmin xmax ymin ymax]) "모두! 감사합니다 :) – kiyarash
원한다면 내 대답을 편집 할 수 있습니다. – Blairg23