“xtick” and “xticklabel” for matrix
1 view (last 30 days)
Show older comments
hello all,
I need to convert pixel numbers of images to coordinates of a 50x50 matrix using “xtick” and “xticklabel” for X-axis and similar for Y-axis.The image has to show "32° N to 38° N and Longitude is from 112° W to 106° W". the "xtick" command gives me an error in Matlab because of the matrix size. What can I do?
thank you!
0 Comments
Answers (1)
Walter Roberson
on 25 Feb 2012
You do not use a matrix of xtick or ytick: you use a vector for them.
image([32 38], [106 112], TheMatrix)
set(gca, 'xtick', 32:38, 'Ytick', 106:112)
0 Comments
See Also
Categories
Find more on Labels and Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!