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

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:


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


How to do this?

I currently use a workaraound:


SetScale/P x 15,1,"", t2
SetScale/P x 0,1,"", t1
t1(15,24)= t2(p)


However this is not compatible with normal wavescaling.


Any suggestions?





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):

  • use [ ] backets to target the point location of the source
  • use ( ) brackets to target the scaled location of the source
  • use 'p' to get the point locations of the target
  • use 'x' to get the scaled locations of the target

So ...

t1[15,24]=t2 // implicitly the same as ...
t1[15,24]=t2[p] // does not work, since 15 is already outside the point range of t2

You probably want ...


You may want to give this a read to learn more:

DisplayHelpTopic "Waveform Arithmetic and Assignment"


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.

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:

SetScale/P x 15,1,"", t2
SetScale/P x 0,1,"", t1
t1(15,24)= t2(x)

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.