【发布时间】:2014-12-26 20:06:25
【问题描述】:
所以基本上我有一个 GUI,我有一个轴图。
我希望我的图表有一个在我单击计算按钮时上下移动的图像。有人能给我指导如何继续这件事吗?使用位置命令?请注意,该图对应于具有时间响应图的控制系统的运动。因此,当系统变得稳定时,画面移动将停止(特定位置)。到目前为止,我的图像甚至没有出现在轴上!在 matlab 上的任何帮助将不胜感激!
for frame=1:1:length(t)
if stop ~= 1
axes(handles.axes5)
cla;
hold on;
if y(frame)<=0
axes(handles.axes5,'position',[3,y(frame)+0.001,3,((y(frame)+1.0000000001))]);
imshow('ball.jpg','position',[3,0.001,3,(1.00000000001)]);
else
axes(handles.axes5,'position',[3,y(frame)+0.001,3,((y(frame)+1.0000000001))]);
imshow('ball.jpg','position',[3,y(frame)+0.001,3,((y(frame)+1.0000000001))]);
end
【问题讨论】:
-
所以这段代码在按钮回调中? y 是什么?
-
y 对应于时间解图,它是 [y,t]=step(sys) 形式的步进输入图;轴(handles.axes5)轴([0,9,0,20])
标签: image matlab user-interface plot position