Built-in Interpolation, ( ) vs [ ]
geologic
For example, take a wave called wave1 with 5 points (0,1,2,3,4). If you ask for print wave1(1.5), Igor looks like it will draw a line between points 1 and 2, and give you the value of the midpoint. Is this a general observation, and is there documentation about it anywhere?
Is there any difference between that and writing print wave1[1.5]? There doesn't seem to be in this context, but in the past I thought I had solved a problem by noting different uses between ( ) and [ ]. For example, assigning interpolated points (for which I used parentheses) to values in a wave (for which I used square brackets).
Specifically resultantwave[j] = wavetobeinterpolated(.732452*i)
The different indices were because I was taking data among many waves of a single value of "wavetobeinterpolated" (temporary name in a procedure) and assigning it to the points of resultant wave.
Thanks,
Matt
DisplayHelpTopic "Indexing and Subranges"
June 1, 2015 at 10:21 pm - Permalink
displayhelptopic "The Waveform Model of Data"
HJ
June 2, 2015 at 02:28 am - Permalink
Yes, I'm also wondering how mixing ( ) and [ ] didn't get me into trouble. I do use wave scaling prior to my use of the parentheses and brackets.
June 2, 2015 at 07:31 am - Permalink
I took points from a scaled wave, which was a function of frequency, and assigned them to points on a different wave, which wasn't scaled. I then plotted the different wave vs. a wave of temperatures in non-uniform steps to obtain the plot I wanted.
June 2, 2015 at 07:42 am - Permalink