![]() The aim is to have a=n/D be the smaller of both variants, so that one has to look for the D in with the larger absolute value. The denominator candidates D1,D2 are in general complex numbers, it is inadvisable to use the simple max which only has sensible results for real inputs. You do not implement the Laguerre method properly as a method in complex numbers. Note that this is in general not very easy to handle since rounding errors can have a big influence on the result. Initial value 1.000000, result 0.147400-0.434500iĪ method for calculating the next root when you have found another one would be that you divide through the corresponding linear factor and use your loop for the resulting new polynomial. ![]() If you want to get other roots, you have to use other initial values. Pd2 = diff(P,X,2) %Second derivative of P ![]() The code syms X %Declaring x as a variable The last one, 0.1474 + 0.4345i is the end result of this loop - the approximation of the root which is in your given tolerance threshold. What you actually see are all the values x(k) which arose in the loop.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |