Interpolate: 2dimension wave

Hello,

I have a 2D Matrix, "D" = 162, Y = 2870. I would like to redimension the matrix so that D equals a new wave "DX" with 81 points but contains the same number of Y points, 2870.

Thanks
Do you mean that you want to change the number of rows from 162 to 81, but you want the number of columns to remain the same? This command will do that:

Redimension/N=(81,-1) D

The "-1" tells Igor that the number of columns should not be changed. This command should keep the data in the first 81 rows. Is that what you want?

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Hi,
I want to redimension one dimension of the matrix. The Y wave will remain the same but I want to replace the x wave containing D =162 pnts with a new wave DX containing 81 pnts. So in the end I will have a new matrix with number of rows = 2870 (Y) and the number of columns = 81(D).

Thanks
LaMP wrote:
Hi,
I want to redimension one dimension of the matrix. The Y wave will remain the same but I want to replace the x wave containing D =162 pnts with a new wave DX containing 81 pnts. So in the end I will have a new matrix with number of rows = 2870 (Y) and the number of columns = 81(D).

Thanks


It is quite difficult to understand what you want to do, because you use a rather peculiar nomenclature.
So suppose you've got a 2-dimensional wave called matrixWave, which has 2870 rows (this is the x dimension) and 162 columns (this is the y dimension). The number of points of this wave is 2870*162=464940.
If you want to cut out the first 81 columns and copy them to a new wave called newMatrixWave, you can do this by
duplicate/o matrixWave, newMatrixWave
Redimension/N=(-1,81) newMatrixWave

This is essentially the same that John suggested yesterday exept that the original matrixWave remains unchanged.
You can also do this in one step by

duplicate/o/r=[][0,80] matrixWave,newMatrixWave

A
Hi

It is not really what I want to do.
I need to interpolate my columns from 162 values down to 81 values.
Thanks

Try Resample:

Duplicate/O matrix,matrix_samp
Resample/DIM=1/DOWN=2 matrix_samp

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
JimProuty wrote:
Try Resample:

Duplicate/O matrix,matrix_samp
Resample/DIM=1/DOWN=2 matrix_samp

--Jim Prouty
Software Engineer, WaveMetrics, Inc.


Is there a way to resample a wave based on the number of rows and not the decimated fraction. For example, I have a would like to reduce a wave1 with 1845 row data points, down to 176 data points using the averaging Resampling feature, but the decimation scale is a fraction of 10.5 which IGOR does not allowed. More specifically, I have an absorption spectra with light intensity values taken at every 1 nm and need to obtain a representative spectra taken at every 4 nm to use in an efficiency formula. I am probably over complicating this... thanks!

-Jacob
I would use:
ImageInterpolate/RESL={nx,ny} bilinear srcWave


where nx and ny are the desired output dimensions.

A.G.
WaveMetrics, Inc.