Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
Hello,
In the attached Mathcad 2000 worksheet, I am trying to reproduce an example of a filter polynomial synthesis from a book on microwave filters. In Step 3 at the end of the worksheet, I construct the polynomial P(s) = i*s^2 + 3.1299*s - 2.3899*i using symbolic math. If I use the symbolic processor to evaluate the function P(s) coeffs, s -->, I obtain a vector containing the coefficients of the powers of s: ( -2.3899i, 3.1299, i). I would like to assign this vector of coefficients to a variable p for later use with the numeric processor. But the statement p := P(s) coeffs, s doesn't work. I realize that I could manually copy and paste the symbolic evaluation result ( -2.3899i, 3.1299, i) into an assignment statement for the variable p, but I need a solution that does not require manual operations so that I can eventually these equations in an optimization loop.
Sincerely,
Ralph Giffone
Bloomfield, NJ
Solved! Go to Solution.
I vaguely recall that there were issues typing such expressions back in MC2000. Try typing p: on a separate line. Then select the entire symbolic expression (including the rhs), copy it , and paste it into the placeholder to the right of the assigment operator in the new p: expression.
If that doesn't work, post a copy of the worksheet with the full "p:=P(s) coeffs" expression in it. Also, as Werner requested, tell us exactly what error message you are getting.
It's also possible that MC2000 did not allow such a construct. It's been a long time!
Ralph Giffone wrote:
Hello,
But the statement p := P(s) coeffs, s doesn't work.
It works in Mathcad 15:
Unfortunately I don't have version 2000, which is rather old, installed and can't try. As Valery already wrote it works with version 15 - that is: clicking somewhere inside the last math region of your worksheet and typing
:p[enter]
You wrote that the statement does't work. What was the problem? I assume an error message. Which one?
I know that I myself very often had problems assigning symbolical evaluations to variables, too (mostly inside of programs though). Copy and paste usually helps.
In your case try to mark your math region as it is now including the arrow and result and cut or copy it. Then type p: and paste to the placeholder you just got.
I vaguely recall that there were issues typing such expressions back in MC2000. Try typing p: on a separate line. Then select the entire symbolic expression (including the rhs), copy it , and paste it into the placeholder to the right of the assigment operator in the new p: expression.
If that doesn't work, post a copy of the worksheet with the full "p:=P(s) coeffs" expression in it. Also, as Werner requested, tell us exactly what error message you are getting.
It's also possible that MC2000 did not allow such a construct. It's been a long time!
Many thanks to all of you who replied!
The error message was: "The units in this expression do not match."
Perhaps you were all trying to explain the same thing to me, but Mr. Jackson's answer was the one that "clicked" for me and worked. The solution is:
"Try typing p: on a separate line. Then select the entire symbolic expression (including the rhs), copy it , and paste it into the placeholder to the right of the assigment operator in the new p: expression."
I would never have thought of this, since there are two assignment statements (one numeric and one symbolic).
A simple procedure which does exactly the same thing is to type "p :" and then click on the "coeffs" button on the Symbolic toolbar.
The revised worksheet is attached.
Ralph Giffone
nice to knowI haven't gone senile yet