Creating .PNG image from temperature values

M
Merrick · Oct 30, 2020 · 1.8K views
Question
The size of my table (i.e. variables) is 462x622 double I used the code below to create an image: imagesc(image); colormap jet; axis off However, the pixel size of the resulting image is 420x560. How can I make an image with the same pixel size as the variables?  
Expert Answer
Profile picture of John Michell
John Michell PhD Expert
Answered Aug 24, 2026

I guess you are using saveas() or some other function to save the .webp file. They are not suitable for maintaining the resolution. Use imwrite() as shows in the following lines

image = round(rescale(image, 1, 256));
imwrite(image, jet, 'image.webp');
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!