Transform XYZ data to use interp2() on Z

I have data in an XYZ format, consisting of two 1x100 vectors (X & Y) and one 100x100 matrix (Z). I plan to use interp2() to lookup two of the co-ordinates to find the third, however, I am most interested in looking up the Z co-ordinate - not the X & Y which interp2() provides.
My first idea is to transform the data such that the axes get changed (i.e. converting XYZ into a new XYZ dataset, where newX = oldZ, newY = oldX, newZ = oldX, or something like that) so that I can use interp2() as it was intended, but I cannot think how to do this at all, let alone neatly.
Also, my Z matrix contains mostly NaNs, but the numerical values are all unique.
Can anyone suggest how to tackle this, or if there is a better way to do this?

Antworten (0)

Produkte

Gefragt:

am 20 Feb. 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by