我有一个设置,使用11个探头以一定间隔测量一台设备的温度曲线,我希望制作一个关于轮廓如何演变的动画图。 我将温度数据放在一个简单的m-by-n矩阵(约11x50000)中,其中每列代表一个探针,每行代表一组新的测量值。 它是针对一个简单的0:1:10矢量绘制的,以查看温度凸起如何随时间移动。
这在Matlab中是否可行?如果是这样的话怎么样? 我一直浏览了很多而没有发现任何有用的东西。 对不起,如果有任何现有的帖子,我没有偶然发现。
编辑:为插图添加的图像。 图像中的图是来自我希望动画的矩阵的各行的图。 示例图在测量中间隔约2分钟。 我所寻求的是有一个动画图形,显示温度凸起如何增长并沿y轴移动。 同样重要的是,我希望导出这个动画人物用于演示文稿。
matlab中的变种
I have a setup that measures the temperature profile of a piece of equipment at an interval using 11 probes and I wish to make an animated plot for how the profile evolves. I have my temperature data in a simple m-by-n matrix (about 11x50000) where each column represents a probe and each row represents a new set of measurements. It is to be plotted against a simple 0:1:10 vector to see how a temperature bulge moves over time.
Is this even possible in Matlab and if so how? I have been browsing around for quite a bit without finding anything useful. Sorry if there are any existing posts I haven't stumbled upon.
Edit: Image added for illustration. The plots in the image are plots of individual rows from the matrix i wish to animate. The example plots are about 2 minutes apart in the measurements. What I seek is to have a single animated figure that shows how the temperature bulge grows and shifts along the y-axis. Equally important, I wish to export this animated figure for use in a presentation.
vars in matlab
最满意答案
如果我理解您的问题,您可以尝试以下方法:( 进一步修改最后评论后的代码)
% Generate example data data=randi(10,1,100); data=[data;randi(10,1,100)+10] data=[data;randi(10,1,100)+20] data=[data;randi(10,1,100)+30] data=[data;randi(10,1,100)+40] t=1:101; h_fig=figure axes plot(data(:,1),t(1)) grid on xlim([0 100]) % legend(the_legend) hold on for i=1:100-1 tmp_h=plot(data(i,:),[1:5],'-d') M(i)=getframe(h_fig); pause(.3) delete(tmp_h) end movie2avi(M,'testMovie2______.avi','fps',3)希望这可以帮助。
If I've understand yor question, you might try the following: (further modified the code following the last comment)
% Generate example data data=randi(10,1,100); data=[data;randi(10,1,100)+10] data=[data;randi(10,1,100)+20] data=[data;randi(10,1,100)+30] data=[data;randi(10,1,100)+40] t=1:101; h_fig=figure axes plot(data(:,1),t(1)) grid on xlim([0 100]) % legend(the_legend) hold on for i=1:100-1 tmp_h=plot(data(i,:),[1:5],'-d') M(i)=getframe(h_fig); pause(.3) delete(tmp_h) end movie2avi(M,'testMovie2______.avi','fps',3)Hope this helps.
更多推荐
发布评论