Decimating a 3D Wave

I have a large 3D wave that I would like to use the decimation function on, but the problem is that when I decimate the the wave it becomes a single wave. I would like to keep it as a 3D wave if possible. I am not sure if this is possible, but I would love to hear your suggestions. Thank you in advance!
Please post your code and the results in more detail.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
The code I have been using is:
Make/O/N=1000 wave0
SetScale x 0, 5, wave0
wave0= sin(x) +gnoise(.1)
Make/O/N=100 decimated
SetScale x 0, 5, decimated
decimated=wave0[p*10]

I have been using this code to decimate a 3D wave, but it takes the 3D wave down into a single wave. I am not sure if it would be possible to keep the 3D wave, but that is what I am trying to do.

Thanks for your help!
The following seems to work. Still not sure what your 3D code is doing.

Macro demo3DDecimation()

    Make/O/N=(30,30,30) threed= sin(p/30*pi)*cos(q/30*pi)*r/30
   
    Make/O/N=(3,3,3) decimated= threed[p*10][q*10][r*10]
End

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
That sequence of commands will extract every tenth point from the source wave; it doesn't do any averaging. I don't know if that's intended.

It also uses 1D wave assignments, and the result is expected (at least by us at WaveMetrics :)

Here is a sequence of commands that does something similar to what you did in 1D, but it does it on a matrix:
make/N=(1000,1000) junk
setscale/I x 0,5,junk
setscale/I y 0,5,junk
junk=sin(x) + cos(y) + gnoise(.1)
make/N=(100,100) junkdec
setscale/I x 0,5,junkdec
setscale/I y 0,5,junkdec
junkdec = junk[10*p][10*q]
display;appendimage junk
display;appendimage junkdec

Note that everywhere the waves are explicitly 2D. And when you write a 2D wave assignment you *must* have explicit p's and q's on the right side.

Please read about multidimensional waves:
DisplayHelpTopic "Multidimensional Waves"

And that topic has a sub-topic on wave assignment:
DisplayHelpTopic "Multidimensional Wave Assignment"

And if you haven't done it yet, I strongly urge you to go through Getting Started. Just select Getting Started from the Help menu. The Guided Tour takes a while to complete, but will introduce you to the way Igor "thinks" which is sometimes idiosyncratic. Do at least the first half of the Guided Tour.

And you may benefit from reading about 1D wave assignments as well:
DisplayHelpTopic "Waveform Arithmetic and Assignment"

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com