Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
Can any one solve this using matlab??
develop a matlab code to find all roots of a polynomial with order n
n=3
n=4
n= any n
Thank you very much Jack, I really appreciate it, I own u a favor man, but can u please send it to me by code
2 Answers
- 1 decade agoFavorite Answer
Here is an example:
Use the MATLAB function ROOTS
If the nonlinear algebraic system is a polynomial equation, we could use the MATLAB routine roots to find the zeros of the polynomial.
Consider the function
f(x) = x3 - 5x2 -x +2
The user must create a vector of the coefficients of the polynomial, in descending order,
p = [1 5 -1 2]:
Then the user can type the following command
roots(p)
and MATLAB returns the roots
ans =
5.1190
-0.6874
0.5684
** Confirm that x = 0.5684 is a root by typing f(0.5864).
- 5 years ago
A hundred thanks to both of you, smci and Dragan K, for really following up on this problem. it started out to be an idle speculation about the locus of P as k varies and I quite naturally assumed that it'd smoothly travel to point B, and I was going to suggest a puzzle based on that. I was disappointed in finding out that the locus ends abruptly instead, jumping to B. I'm not sure if I can figure out a more graphical way to illustrate this.