Is there a Matlab function to convert a plot into a matrix or image?
11 次查看(过去 30 天)
显示 更早的评论
If I write something like this
x=1:128;
y=exp(-x.^2/128)
p=plot(x,y); % I want to convert the plot on the screen to a matrix or image under program control.
can I write Matlab code to convert the plot I see on the screen to a matrix or image? I don't want to do this manually with "Save As", that is, I want to be able to automatically convert a series of plots into matrices or images.
0 个评论
采纳的回答
the cyclist
2022-9-24
编辑:the cyclist
2022-9-24
I assume you mean that you want to do it programatically, as opposed to interactively.
I'm a creature of habit, and I generally use the print function to save a figure to an image file. There are other options, such as exportgraphics and saveas.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!