cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Upsample or interpolate complex numbers

vyerokhin
5-Regular Member

Upsample or interpolate complex numbers

Does anyone know of a method to interpolate or upsample a "straight line" between 2 complex points?

 

For example, between points (1+1j) and (4+4j) get (arbitrary) 2 more points: (2+2j) and (3+3j).

Or as shown in picture, get vector [Matrix?] Z (not exactly, but similar) from W. 

interpolate complex numbers.png

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions


@vyerokhin wrote:

Does anyone know of a method to interpolate or upsample a "straight line" between 2 complex points? 


complex "points"? You obviously mean complex numbers.

You do i the same way as with real numbers.

Maybe that way:

B.png

View solution in original post

8 REPLIES 8


@vyerokhin wrote:

Does anyone know of a method to interpolate or upsample a "straight line" between 2 complex points? 


complex "points"? You obviously mean complex numbers.

You do i the same way as with real numbers.

Maybe that way:

B.png

View solution in original post

vyerokhin
5-Regular Member
(To:Werner_E)

Thank you very much, Werner_E!

Yes - I meant complex number. I said complex points because I was thinking in terms of plotting on a complex plain. 

ttokoro
17-Peridot
(To:Werner_E)

Thanks good Mathcad sheet. I'm watching all community reply by Werner_E.

May be this is a next step of this subject.  

Tokoro

Werner_E
24-Ruby IV
(To:ttokoro)

You like playing around with thing and had posted some interesting worksheets in the past 😉

Here is UpSamplePoly based on your idea to use "polyint":

B1.pngB2.png

The drawback here is that real parts and imaginary parts are treated differently and so depending on the initial data set it may yield very strange and unusable results.

Try to exchange real and imaginary parts in your sample data -> W:=Im(W)+1i*Re(W)

and see what happens 🙂

B3.png

Werner_E
24-Ruby IV
(To:Werner_E)

Of course things look (a little bit) better if we sort W by the real parts beforehand.

B.png

Werner_E
24-Ruby IV
(To:Werner_E)

Here is a last version that uses polyint and still handles real and imaginary parts alike.
It may be useful in some situations, less useful in others.

 

B1.png

Werner_E
24-Ruby IV
(To:Werner_E)

And here is the real last one 😉

I got rid of polyint and replaced it by cubic spline interpolation. This tends not that much to overshoot and is more stable, especially with larger data vectors.

B.png

ttokoro
17-Peridot
(To:Werner_E)

Thanks Werner. Second line in your UpSampleSplineC is a key technique of this function.

Indexes of rows(W) such as 0,1,2,3 can be used as base of both Wx and Wy for up sampling. 

Using your new functions, Lissajous figures can made by up sampling.

Tokoro

 

Lissajous.png

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."