changing units of axes and image
changing units of axes and image
(OP)
Hi everyone,
all images I have displayed yet have the same size as my matix. For example: I got a matrix 250x1000 then the units of my axes are also from 0 to 250 and from 0 to 1000. But I want to have another unit. I want to see the size of the image in millimeter. How can I manage that?
all images I have displayed yet have the same size as my matix. For example: I got a matrix 250x1000 then the units of my axes are also from 0 to 250 and from 0 to 1000. But I want to have another unit. I want to see the size of the image in millimeter. How can I manage that?





RE: changing units of axes and image
If you are, then his should do it.
data = peaks(100)
x_low = 200;
x_high = 400;
y_low = 50;
y_high = 60;
imagesc([x_low x_high], [y_low y_high], data);
M
RE: changing units of axes and image
thank you for your reply. But I don't understand your programming code and primarily I don't get the image I want. Maybe I did not explain my problem good enough.
I don't want to change the image itself, I want to change the units of the axes.
Right now the units of the axes are pixel I guess (eg. from 0 to 250 and 0 to 1300) and now I like to have the same image but the tags of the axes should be eg from 0 to 100 mm and from 0 to 50 mm. But the picture should stay the same. I don't want to scale the image itself.
Thank you very much for any reply
sui
RE: changing units of axes and image
For your example:
data = your_own_image_matrix;
x_low = 0;
x_high = 100;
y_low = 0;
y_high = 50;
imagesc([x_low x_high], [y_low y_high], data);
RE: changing units of axes and image
Do I have to calculate that first or can I get the values somewhere?
thanks a lot
sui