matrix size and figure size(in pixel)

Hi everyone.
I'm stuggle to convert matrix to figure with saveas function.
I have 37*400 double matrix A. And I want to convert this matrix to image.
So, I tried to :
imshow(A,[])
saveas(gcf,'filename.png')
When I read this saved figure with imread('filename,png'), the matix size is 200*893*3 uint8.
But I want to get image which has same size with matrix A (37*400). How can I fix this problem????
Thank you,.

 Risposta accettata

MK kim
MK kim il 1 Dic 2021
I solved this problem!
not using saveas(gcf,'filename.png')
instead using imwrite(uint8(A),filename.png')
So you don't have to answer my question!

Più risposte (0)

Tag

Richiesto:

il 1 Dic 2021

Risposto:

il 1 Dic 2021

Community Treasure Hunt

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

Start Hunting!

Translated by