wave splitting

Hello,

I am new with Igor and it might be an easy/stupid question. How can I split a wave in two waves, first contain the 1st, 3rd, 5th, 7th ....etc lines of the initial wave and the second the rest (2nd, 4th, 6th, 8th, ... etc)?


Thank you so much
Suppose, the wave you want to split is called wave0, then by entering the following two commands on Igor's command line you'll get two waves, W_even and W_odd. The former will contain the entries with an even index and the latter those with an odd index.
Remember that wave indexing starts with 0.

make/N=(ceil(numpnts(wave0)/2)) W_even = wave0[p*2] make/N=(floor(numpnts(wave0)/2)) W_odd = wave0[p*2+1]
awirsing wrote:
Suppose, the wave you want to split is called wave0, then by entering the following two commands on Igor's command line you'll get two waves, W_even and W_odd. The former will contain the entries with an even index and the latter those with an odd index.
Remember that wave indexing starts with 0.

make/N=(ceil(numpnts(wave0)/2)) W_even = wave0[p*2] make/N=(floor(numpnts(wave0)/2)) W_odd = wave0[p*2+1]


Thanks for that. It really works fine but how I can do it with textwaves?
arrg wrote:
awirsing wrote:
Suppose, the wave you want to split is called wave0, then by entering the following two commands on Igor's command line you'll get two waves, W_even and W_odd. The former will contain the entries with an even index and the latter those with an odd index.
Remember that wave indexing starts with 0.

make/N=(ceil(numpnts(wave0)/2)) W_even = wave0[p*2] make/N=(floor(numpnts(wave0)/2)) W_odd = wave0[p*2+1]


Thanks for that. It really works fine but how I can do it with textwaves?


Assuming that wave0 is a text wave already, then use the /T flag in the make operation as follows:

make/T/N=...


--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville