Xup*_*pla 9 matlab image time-series
我有一个绘制时间序列的函数,现在我想将其保存为图像,请问如何才能完成?
function TimeSeriesImages(a, b, c, d, e, f, g, h, i, j, k, l)
x = [a b c d e f g h i j k l];
ts1 = timeseries(x,1:12);
ts1.Name = 'Monthly Count';
ts1.TimeInfo.Units = 'months';
ts1.TimeInfo.Format = 'mmm dd, yy'
ts1.Time=ts1.Time-ts1.Time(1);
plot(ts1)
end
Run Code Online (Sandbox Code Playgroud)
小智 17
在Matlab中保存数字的另一种方法是使用变量处理它们并在以后保存它们.
例如:
a=bar(...);
b=hist(...); %some figures
c=plot(...);
saveas(a, 'path\to\file\abc1.png','png');
saveas(b, 'path\to\file\abc2.png','png');
saveas(c, 'path\to\file\abc3.png','png');
Run Code Online (Sandbox Code Playgroud)
来自官方Matlab的片段帮助:
saveas - 使用指定格式保存图形或Simulink框图
句法
saveas(h,'filename.ext')
saveas(h,'filename','format')
Run Code Online (Sandbox Code Playgroud)
描述
saveas(h,'filename.ext')将图形或Simulink框图与句柄h一起保存到文件filename.ext.文件的格式由扩展名ext确定.有关更多信息,请参阅Matlab帮助
| 归档时间: |
|
| 查看次数: |
41147 次 |
| 最近记录: |