how to partition a wave (newbie)

Hello,

I use Igor pro since a few days only, so please don't be to severe.. and even worse : as you can see, I can't write english very well !
My problem is that I don't know how to create many waves from a single one, automatically. My data are in a single wave (wave0), and I want to partition it in many waves, but without using the "make" operation manually, for each of them. Moreover, I would like to automatically name it, for exemple using an increment.

I tried something like that :

Function dada(nbang, size)
variable nbang, size
variable i
wave wave0
for (i=0;i Make/N=(size)/D/O ang //something's missing here
appendtotable ang
ang[0,size-1]=wave0[p+size*i]
endfor
End

but off course, there is only one wave called "ang" and it only contains the last "size" values from wave0. And I would like "nbang" waves (named according the "i" increment, if possible), each of them containing "size" values.

Thank you !

Simon
Sorry, something's wrong happened, here is the full post :

Hello,

I use Igor pro since a few days only, so please don't be to severe.. and even worse : as you can see, I can't write english very well !
My problem is that I don't know how to create many waves from a single one, automatically. My data are in a single wave (wave0), and I want to partition it in many waves, but without using the "make" operation manually, for each of them. Moreover, I would like to automatically name it, for exemple using an increment.

I tried something like that :

Function dada(nbang, size)
variable nbang, size
variable i
wave wave0
for (i=0;i(nbang;i+=1) // < instead of (, but it seems it doesn't work here
Make/N=(size)/D/O ang //something's missing here
appendtotable ang
ang[0,size-1]=wave0[p+size*i]
endfor
End

but off course, there is only one wave called "ang" and it only contains the last "size" values from wave0. And I would like "nbang" waves (named according the "i" increment, if possible), each of them containing "size" values.

Thank you !

Simon
What about this:
Function dada(nbang, size)
    variable nbang, size
    variable i
    wave wave0
    edit
    string angStr
    for (i=0;i<nbang;i+=1)
        angStr="ang"+num2istr(i)
        Make/N=(size)/D/O $angStr /Wave=ang
        ang=wave0[p+size*i]
        appendtotable ang
    endfor
End


A
Simon87 wrote:
Sorry, something's wrong happened, here is the full post :


When you post code here, make sure that you surround it with <igor></igor> tags. Otherwise, when the system sees greater than and less than symbols (> and <), it thinks they are part of HTML tags.