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
- :
- extracting coefficients of e^ix from polynomial

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

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

04-09-2013
07:57 AM

04-09-2013
07:57 AM

Hi everyone,

I am trying to extract the coefficients of e^ix from a polynomial. My attempts using the coeffs, e^ix command have been unsuccessfull and I am wondering if anyone has another solution.

So, i have a function like: y= (2+5k)e^ix + 7e^2ix + (2+9a)e^-ix

and want MathCAD to give me: coeffs(y) = ( 2+9a; 2+5k; 7).

Another example is in the attached file

Thanks for your replies!

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

04-10-2013
04:22 AM

04-10-2013
04:22 AM

There is a problem with your sheet as the three Vector functions at the top won't consider their argument. If you look at the coefficients at the end you will notice there is no "b0" or "b1" showing up as it should. You have to follow the definition of those functions immedeatly by a symbolic evaluation to make it work. You may then omit that symbolic eval at the definition of Phi, as it would not be necessary there anymore.

13 REPLIES 13

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

04-09-2013
09:03 AM

04-09-2013
09:03 AM

Re: extracting coefficients of e^ix from polynomial

Haven't tried it, but couldn't you substitute e^i*theta for a variable X and search the coeefs of X? Even better replace the e^i*thata in BClefthand for X to do so.

I noticed that your functions a0vector() etc. are simply transposing its argument vector. Os ther a reason for doing it that elaborate way?

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

04-09-2013
11:58 AM

04-09-2013
11:58 AM

Re: extracting coefficients of e^ix from polynomial

Hi Werner,

I did try to substitute for a variable X and search coefficients but MathCAD doesn't replace it. So, I think it is unable to recognise e^i*theta as a function, no idea. (my knowledg about MathCAD is minimal).

About the a0vector, etc... what do you mean with transposing the argument vector? The purpose of a0vector, a1vectore, b0vector etc... is that these are unknown coefficients to be determined in a next step by solving the system against some other function. Don't exactly know what you mean with this.

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

04-09-2013
01:06 PM

04-09-2013
01:06 PM

Re: extracting coefficients of e^ix from polynomial

How about the attached?

Alan

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

04-09-2013
01:06 PM

04-09-2013
01:06 PM

Re: extracting coefficients of e^ix from polynomial

Don't know if this helps or even if it's right.

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

04-09-2013
02:44 PM

04-09-2013
02:44 PM

Re: extracting coefficients of e^ix from polynomial

The question concerning the the coefficients seems to be answered thanks to Alan.

I was about to post a more compact way to create your various symbolic vetcors and to explain what i meant with the transposed vectors when i ran into what I think is a mathcad bug with symbolic stitute.

I attch the file nevertheles for whatever its worth. Maybe you can use parts of it anyway.

The bug is shown in the following screenshots. Don't think there would be a rational explanation for that behaviour and at the moment I see no convenient workaround.

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

04-09-2013
04:20 PM

04-09-2013
04:20 PM

Re: extracting coefficients of e^ix from polynomial

As I found the easy way to avoid that Mathcad bug find attached a more streamlined way to deal with your symbolic vectors. Hope you find it useful.

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

04-09-2013
04:52 PM

04-09-2013
04:52 PM

Re: extracting coefficients of e^ix from polynomial

OK, the last one. This shows how to get around the limitation of the last one of not being able to evaluate numerically.

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

04-09-2013
05:58 PM

04-09-2013
05:58 PM

Re: extracting coefficients of e^ix from polynomial

I've had a go at simplifying the worksheet also (I need to get a life!) - see attached.

Alan

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

04-09-2013
06:25 PM

04-09-2013
06:25 PM

Re: extracting coefficients of e^ix from polynomial

Hmmm. looks like part of my worksheet from another thread

http://communities.ptc.com/message/201711#201711

Think you have attached the wrong sheet

Top Tags