msurov

5 Reputation

One Badge

10 years, 327 days

MaplePrimes Activity


These are questions asked by msurov

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

 

Page 1 of 1