issue with specifying X/Y axis for image/imagesc functions
Show older comments
Has anyone developed an m-file to perform the image/imagesc function on non-uniformly spaced X and Y data.
For example, if I have a 512x512 image and I want my x-axis to be a function of time. Maybe time increases by 1 sec for the first 256 columns and then jumps by 60 secs and then returns back to 1 sec intervals.
Currently, it appears the image/imagesc functions take the min and max value of the X/Y inputs and creates a vector evenly spaced between the min/max values. I don't believe there is a Matlab warning and therefore can lead to misinterpretation of the data. What I would expect to see is an image with a "hole" in the middle (user specified fill value?) with the x-axis from min_time to max_time. (PS - It would be nice if I didn't have to actually insert zeroes into the array where the time jumps are).
Thanks!
Tom
Answers (1)
Image Analyst
on 17 Sep 2012
0 votes
I'd probably use TriScatteredInterp or interp2 to create a uniformly-spaced image.
Categories
Find more on Images in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!