setscale of a matrix dimension with the content of a wave

Hi,

my problem is relatively easy to describe: I have a matrix with position data in x, y direction and spectra in z direction. For the spectra I have a wave with the energies. Since the energies do not have an even spacing, I cannot get further with the proposed variants of setscale.
Is there a possibility to use a wave as a scale, e.g. 

setscale z, scalewave, matrix

or is there only this possibility?

display matrix[x][y][] vs scalewave

Thanks!

(used version 8.04 (Build 34722))

Waveform scaling has to be linear, so you cannot use a wave as input for SetScale. However, your second approach will work, i.e. you can set up a scaling wave for display. Note that such a wave needs to be larger than the target dimension by one point and you need to set the content so that the values fall on the edges between each desired z value. For example, if you have 3 data points in z direction which should be centered at 1,2,3 you need to create a scaling wave with the values {0.5, 1.5, 2.5, 3.5}. Hope that helps.

The display operation does not need the N+1 number of elements. I would say it's not really clear what the intention is. If you are trying to make a standard XY 2D graph using a "beam" from the matrix, then scalewave would need to have the same number of points as the matrix has layers. But the use of "x" and "y" suggests other possibilities.

@g.germer Did you figure out the answer to your problem? If so, please post a description so that others can benefit.

In reply to by johnweeks

All in all my question has been answered. Thank you very much. I just wanted to use a beam of this matrix (or many beams of many matrices). To avoid confusion, here is just an example for the display workaround:

display matrix[1][2][] vs scalewave

I had hoped that it would be possible to define a scaling with irregular spacing for the z-axis (or any other axis). It would be a simplification for me if all information could be stored together in a single matrix. Maybe there could be a wavebased scaling sometime in a future version of Igor? Something like

setscale/X dim,scalewave,wave