Adding intentionally NaN values to a Wave

I know this is a weird question but I am trying to format data in a very specific way. For the particular analysis, I need data grouped together in one wave, separated by a blank space. In a numerical wave, when adding a blank space, via insertpoints, it just fills the value with "0" by default. I intend to save it as .txt from igor and want those divisions of data to just show up as blank lines.

ex.

1

2

3

4

5

 

6

7

8

9

10

 

11

12

13

14

.

.

.

 

thank you!

tony

in Igor 8 you can use the /V flag to specify the value for inserted points:

InsertPoints /V=NaN beforeElement, numElements, waveName

 

thomas_braun

@tony: Now that's a bummer I did not know what you can append to waves like that. For the curious ones this is explained in

DisplayHelpTopic "Indexing with an index wave"

but also requires you to realize that the indexing wave can also just be one index. And

wave0[inf] = {NaN}

works here as well even with rtGlobals=3.

johnweeks

@thomas_braun: This is an example of why AG can't change the behavior of WaveStats/RMD={inf, nan} :)

(For those wondering, this is a cryptic reference to a recent tech support incident)

thomas_braun

@johnweeks: I'm coding it like that because this is currently the way you do igor programming.

But I would like to see a move like from C++98 to C++11 in Igor as well. Or to rephrase that, once you offer rtGlobals=4 or an equivalent I'll use that and adapt my code.