Mathcad Prime 10: Error when using Root() function on Linfit() polynomial
- February 20, 2025
- 1 reply
- 1060 views
Hello Mathcad community,
I ran into an error while using the root() function on a linfit() polynomial in Prime 10.0.1.0.
I approximated a function by using the linfit() function on two vectors for the x- and y-coordinates respectively. The resulting coefficient vector for a cubic polynomial approximation is shown below.

The approximating function can now be written as below (as a dot-product):

I need to find the z-coordinate for a given value of s(z), so I want to use the root() function to do this. When entering the function as specified above, the root() function gives me the error "these matrices must have compatible units".

However, when I use the individual polynomial coefficients from c_cub to specify the s(z) function directly by expanding the dot-product, everything works fine.

Any idea why this behaves differently? What am I missing?
Thanks for any insights on this.
Joost



