Simple and intuitive. This was definitely missing in matlab!

Following improvements could be made:
1. Handle start and end of range in case where it is not exactly on a sample point
2. Check that x is monotonically increasing and resort vectors if necessary.

There is a BUG in the calculation of the index of the upper bound. You must call the min() function to find the correct index, not the max() function.

This is a nice short code, but it covers only a very special case and does not tell which one exactly.
I recommend spincalc() from Jonathan Fuller. It is much more powerfull!

Thanks for this submission. One remark: the y axis is reversed compared to the behaviour of imagesc. I like that but it should be mentioned in the description of the function.

Comment only

17 Sep 2012

xyimagesc.m
Same as imagesc but works when X and Y are not evenly spaced.

Thank you for submitting this! Functionality is exactly what I needed. My only minor complaint is that it seems to run slow. Maybe there is a way to speed it up?

Comment only

03 Mar 2012

xyimagesc.m
Same as imagesc but works when X and Y are not evenly spaced.

Comment only