sync2

Synchronizes two different vectors.

Syntax

sync2(old_1, old_2)

Input

old_1
The first vector to be synchronized.
old_2
The second vector to be synchronized.

Example

Example 1
Template:
x1={1,2,3,4,5}
x2={2,3,4}
sync2(x1,x2)
Output:
2, 3, 4
Example 2
Template:
{sync2(4:10:2,2:7:0.5)}
Output:
4, 4.5, 5, 5.5, 6, 6.5, 7
Example 3
Template:
{sync2({5,8},{0,3,5,6,7})}
Output:
5, 6, 7

For example, sync2 can be used to synchronize and add two curves with different x-vectors in combination with linear interpolation.

Below are two curves, c1 and c2, with different x-vectors:
X-Vector of summary curve
sync2(c1.x,c2.x)
Y-Vector of summary curve
lininterp(c1.x,c1.y,x)+lininterp(c2.x,c2.y,x)

Comments

First, sync2 returns the highest minimum of the two vectors.

Next, sync2 returns the lowest maximum of the two vectors.

Finally, sync2 returns the values between these two values at the highest sample rate.