Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Upsample or interpolate complex numbers

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-09-2019
04:30 PM

07-09-2019
04:30 PM

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.

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-09-2019
08:00 PM

07-09-2019
08:00 PM

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

8 REPLIES 8

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-09-2019
08:00 PM

07-09-2019
08:00 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-09-2019
09:37 PM

07-09-2019
09:37 PM

Re: Upsample or interpolate complex numbers

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-10-2019
04:21 AM

07-10-2019
04:21 AM

Re: Upsample or interpolate complex numbers

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

May be this is a next step of this subject.

Tokoro

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-10-2019
06:07 AM

07-10-2019
06:07 AM

Re: Upsample or interpolate complex numbers

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

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-10-2019
09:09 AM

07-10-2019
09:09 AM

Re: Upsample or interpolate complex numbers

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-10-2019
12:04 PM

07-10-2019
12:04 PM

Re: Upsample or interpolate complex numbers

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-10-2019
01:01 PM

07-10-2019
01:01 PM

Re: Upsample or interpolate complex numbers

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

07-10-2019
09:42 PM

07-10-2019
09:42 PM

Re: Upsample or interpolate complex numbers

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

Top Tags