Can we convert a jpg or png image into a fig file via Matlab?

If we have a *.jpg or *.png image and we want to convert it to *.fig image using MATLAB code, how will we do it?

Answers (1)

a=imread('yourImage.jpg');
b=figure;
imshow(a);
saveas(b,'b.fig');

1 Comment

Thank you very much dear David Hill for your kind response. Indeed it worked and is very interesting. Now how will I plot my own data plot on this converted Matlab fig file?

Sign in to comment.

Categories

Find more on Printing and Saving in Help Center and File Exchange

Asked:

on 19 Oct 2022

Commented:

on 19 Oct 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!