How do i convert an image plot to a matrix.
32 次查看(过去 30 天)
显示 更早的评论
I was wondering if it was possible to create a matrix out of a figure plot.
I would be grateful for any help. Thanks.
0 个评论
回答(3 个)
Ben11
2014-11-21
Maybe I misunderstood but you might want to use getframe and get the cdata property:
Example:
x = -10:10;
y = x.^2;
plot(x,y)
Frame = getframe(gcf)
FrameData = Frame.cdata; %// This is a matrix that you can plot/show with imshow.
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!