Hi, I am trying to convert this .jpg file to matlab.fig file. I try with imread(*.jpg) and then imagesc(:,1:end). It do display the fig but with a red colour all over the image. Please help me

 採用された回答

Wanbin Song
Wanbin Song 2015 年 10 月 28 日

1 投票

As my understanding of your question, it is pretty simple as below:
img = imread('~~.jpg');
imshow(img);
savefig('~~~.fig');

4 件のコメント

Chris Martin
Chris Martin 2015 年 10 月 28 日
I tried with this but it does not work, it displays unsupported dimension, please download the jpg file and try
Wanbin Song
Wanbin Song 2015 年 10 月 28 日
I tested with your file and confirmed it. What do you mean 'unsupported dimension'?
Chris Martin
Chris Martin 2015 年 11 月 4 日
It works....Thank you
Shashank Chandrasekaran 16BEE0334
Shashank Chandrasekaran 16BEE0334 2018 年 8 月 25 日
Thank you so much!!! It worked for me.

サインインしてコメントする。

その他の回答 (1 件)

Muhammad Khan
Muhammad Khan 2018 年 5 月 29 日

0 投票

I am using this code to convert .jpg file to maltab .fig but in matlab lab file there is no figure represented and if I want to convert more than one .jpg files to fig how can I. I am attaching two files.

カテゴリ

ヘルプ センター および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by