The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Changing Scale in imagesc
Replies: 2   Last Post: Sep 2, 2012 4:34 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 3
Registered: 9/2/12
Changing Scale in imagesc
Posted: Sep 2, 2012 1:45 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I have a matrix (B) with a size of 2326*250 which by using the imagesc(B) shows me the image of it. The Y axis of it is shown by 1 to 2326 in an increment of 200 and the X axis from 1 to 250 with an increment of 50 which makes sense. However, I want to change the scales to the real values which are in mm rather than the index of the matrix. The real values start from 0 to 45 mm along Y axis and 0 to 100 mm along the X axis. I have tried changing the Y axis scale by using YThick and YTickLabel as shown below:
imagesc(B), title('B-Mode Image');

But I want it to be automatic rather than labeling it like this.
I know that the real values would be obtained by:


But it doesn?t work if I write:
set(gca,'YTick', =(1:2336)*0.0192637)
Could anyone please help?

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.