restrc.blogg.se

Matlab polyroots
Matlab polyroots













matlab polyroots

% Note: Matlab order of polynomial is reverse of R The syntax and output for these examples are as follows: SAS IML polyroot function appears to use double-precision calculations but was not nearly as accurate as the R polyroot function for the repeating-roots example. The same appears to be true for the Matlab function roots. It appears to be single-precision arithmetic on the real and imaginary parts. The R solve function is quite inaccurate for the repeating-roots example.

matlab polyroots

The results indicate that the R polyroot function is the most accurate for these examples. I used Mathematica solutions as the reference: This post, however, is about comparative accuracy of (1) the R solve functionused in the included post, (2) the R polyroot function, (3) the Matlab roots function, (4) the SAS IML polyroot function. One post on the subject noted that the square-roots in those solutions also require iteration, and one post claimed iterative solutions are more accurate than the explicit solutions. help.start(), doc help -i browse with Info. One obviously could create functions using the explicit algebraic solutions. I'm responding to a post about finding roots of a cubic or quartic equation non-iteratively. solving cubic/quartic equations non-iteratively - comparisons Larry Hotchkiss larryh at Solving cubic/quartic equations non-iteratively - comparisons















Matlab polyroots