What's the difference between imagesc and imshow?

Illustration
Timothy - 2020-12-24T12:48:44+00:00
Question: What's the difference between imagesc and imshow?

Hi, When I want to display an image in figure screen, both works the same way. I was wondering what's the difference between both imagesc and imshow commands?

Expert Answer

Profile picture of Prashant Kumar Prashant Kumar answered . 2025-11-20

imshow has a number of default settings intended for displaying images, such as turning off the axes and locking the aspect ratio, that imagesc does not. imshow also had additional options for customizing how you view the image that are not available or not as easily doable through imagesc. You can see the basic differences by doing something like the following and looking at the two figures side by side.

>> imagesc(myimage)
>> figure
>> imshow(myimage)

You can get full details on the functions and their usages through their documentation pages.

>> doc imagesc
>> doc imshow

Finally you can view the source code for both if interested.

>> edit imagesc
>> edit imshow


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!