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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

15-Moonstone

## How to get polynomial coeffs in program block?

Hi guys!

I need your help again 🙂

MC15 file is attached.

1 ACCEPTED SOLUTION

Accepted Solutions
23-Emerald III
(To:ifomenko)

Try this.

Success!
Luc

9 REPLIES 9
24-Ruby V
(To:ifomenko)

15-Moonstone
(To:Werner_E)

Thank you Werner!

Sorry, I marked LucMeekes`s answer as correct because of his level is less than yours, don`t be offended by me 🙂

24-Ruby V
(To:ifomenko)

@ifomenko wrote:

Thank you Werner!

Sorry, I marked LucMeekes`s answer as correct because of his level is less than yours, don`t be offended by me 🙂

Don't worry! Most of us don't care about that level, points, ... 🙂

BTW, the main point is that the symbolic evaluation must be done INSIDE the program. In your trials you evaluated the whole function symbolically which happens automatically if the function is just a one-liner.

That was the reason for my dummy line with the quotes.

As an alternative you can put the symbolic eval in parenthesis like ...:=(t coeffs, x[i -> )

All this won't work in Prime, BTW, as they have broken the possibility to insert symbolic evals inside programmed functions 😞

23-Emerald III
(To:ifomenko)

Try this.

Success!
Luc

15-Moonstone
(To:LucMeekes)

Luc!

I made some critical changes with your function, it has to return 3x3 matrix.

23-Emerald III
(To:ifomenko)

No problem.

I took it one step further. It now should work for n equations (with n variables) and independent on the setting of ORIGIN.

Success!
Luc

15-Moonstone
(To:LucMeekes)

Why there is an error in the first case (rows({Coeffs}) but there is not in the second (rows(scalar))?

23-Emerald III
(To:ifomenko)

That's potentially because {Coeffs}  is symbolic, so the numeric processor complains if there it contains any undefined variables.

The numeric processor never complains about 1000.

I don't mind as long as the function functions.

Success!
Luc

15-Moonstone
(To:LucMeekes)

I see, many thanks

Announcements
Top Tags