Question: Problems with coeffs function

August 14 2014 msurov 5
Maple 17

1

Hello.

I am trying to extract all the coefficients of a linear equation by calling coeffs function.

eq := 1.2*a[2]+1.3*a[3]+1.1*a[1]+1.0

1.2*a[2]+1.3*a[3]+1.1*a[1]+1.0

(1)

 

vars := [seq(a[i], i = 1 .. 3)]

[a[1], a[2], a[3]]

(2)

coeffs(eq, vars)

1.0, 1.2, 1.3, 1.1

(3)

``


I expected I receive the coefficients in the same order as in vars variable, but I was wrong. How to extract coefficients in the order I need?

Download test.mw

 

Please Wait...