Roots function - polynomials, MATLAB in Statistics

Roots function - Polynomials:

The roots function in MATLAB is used to find the roots of an equation represented by a polynomial. For illustration, for the mathematical function (Note that this is a mathematical expression, not a MATLAB!),

f(x) = 4x3 - 2x2 - 8x + 3

to compute the equation f(x) = 0:

>> roots([4 -2 -8 3])

ans =

   -1.3660

    1.5000

    0.3660

 

 

Posted Date: 10/22/2012 8:41:33 AM | Location : United States







Related Discussions:- Roots function - polynomials, Assignment Help, Ask Question on Roots function - polynomials, Get Answer, Expert's Help, Roots function - polynomials Discussions

Write discussion on Roots function - polynomials
Your posts are moderated
Related Questions
Areacirc function: The areacirc function can be called from the Command Window as shown here, or from a script. Here is a script which will prompt the user for the radius of o

Advanced File Input and Output: In that section, we saw how to read the values entered by user using the input as well as the output functions disp and fprintf, that shows inf

Debugging Techniques: Any error in the computer program is called a bug. This word is thought to date back to the 1940s, whenever a problem with an early computer was found to

Opening and Closing a File: The Files are opened with the fopen function. By the default, fopen function opens a file for reading. If the other mode is preferred, a permission

Example of Mode When no value appears more often than any other, the smallest value in the vector will be the mode of the vector. >> shortx = [2 5 1 4]; >> mode(shortx

Function polyval - interpolation: The function polyval can then be used to compute the polynomial at particular values. For illustration, we could compute at every value in th

Variable packages: Variable packages are now the vector of structures, hence each and every element in the vector is a structure. To show one element in the vector, an index i

Properties of the text box - graphics objects: By using get will show properties of the text box, the illustration is as shown below: >> get(thand)   BackgroundColor

Logical errors: The Logical errors are more complicated to locate, as they do not result in any error message. The logical error is a mistake in reasoning by the programmer, b

Example of Functions which complete a task: For illustration, the function below just prints the number arguments passed to it in a sentence format: As this function i