Shahriar Zaman
Shahriar Zaman

Reputation: 938

How to save image object variable as picture in MATLAB?

I have generated an image using

im = imagesc(tt,ff,log10(abs(wv))); axis off;

But there are two problems:

  1. This pops up a figure window each time after executing the above command. How can I avoid that?

  2. How can I save this figure as a picture without border?

Upvotes: 0

Views: 375

Answers (1)

Majid khalili
Majid khalili

Reputation: 520

As Cris has mentioned in the comments, imagesec is for displaying data in array as an image. If you want to save to just save such image you should use imwrite which is used to save image variables as an image file. In case your variable has not the proper format ind2rgb to convert the indexed image to RGB format.

you can find the duplicate question here in mathworks forums.

Upvotes: 1

Related Questions