how to partition a wave (newbie)
| Simon87 | December 2, 2011 - 04:01 | ||
|---|---|---|---|
|
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 ! I tried something like that : Function dada(nbang, size) |
|||

Joined: 2011-12-02
Location: France
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
Joined: 2007-09-19
Location: Germany
What about this:
A
Joined: 2011-12-02
Location: France
Yes great ! Thank you !
Joined: 2007-03-01
Location: United States
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.