
How to copy a wave into another wave a a defined position?

Ralf Schmauder
I have problems to find the correct syntax for this:
I need to copy the content of a wave into another wave at a specified posItion while overwriting the previouse content.
Naively I tried this:
<pre>
make /o t1=x; make /o /n=10 t2=x t1[15,24]=t2 // does not work t1[15,24]=t2[0,9] // does not work t1[15,24]=t2[p] // does not work
</pre>
How to do this?
I currently use a workaraound:
<pre>
SetScale/P x 15,1,"", t2 SetScale/P x 0,1,"", t1 t1(15,24)= t2(p)
</pre>
However this is not compatible with normal wavescaling.
Any suggestions?
Best
Ralf
And: the work around does not work within a routine in igor7...
April 5, 2024 at 05:21 am - Permalink
It is not totally clear to me what you are trying to do, but here is a short summary of wave assignments for the RIGHT-SIDE expression (I just note the 1D case here):
So ...
You probably want ...
t1[15,24]=t2[p-15]
You may want to give this a read to learn more:
DisplayHelpTopic "Waveform Arithmetic and Assignment"
April 5, 2024 at 05:41 am - Permalink
Thank you,
I was not aware that I can use calculation on [p] as in [p-15].
Best Ralf
Ps: use case is the follwing: I read a binary data file, extract a subset, correct an artefact , copy the corrected part back , write the file back to be used in original application.
April 5, 2024 at 05:52 am - Permalink
Great that it worked for you. You can do quite a few things with wave assignments. By the way, your second example would have worked if you did:
but this is worse than using the point scaling directly, if possible. In general, the wave scaling might be used for actually defining the x axis after all.
April 6, 2024 at 07:13 am - Permalink