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
Reading from Files: There are many lower level functions which read from files. The function fscanf reads the formatted data into a matrix, by using conversion formats like %s

Execution of persistent variables: The functions can also be called from the script or from the Command Window, as shown here. For illustration, the functions are called first

Operation on file: We concentrate first on the fgetl function that reads strings from the file one line at a time. The fgetl functions afford more control over how the data is

Functions which return Values versus printing: Also, the function which computes and returns values (throughout the output arguments) does not generally print them; that is le

Index vector: The index vector is then used as the indices for original vector. To get grades vector in ascending order, the indices used would be grades (2), grades (5), and

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

Indexing: The Indexing is an alternate to sort a vector. With indexing, the vector is left in its original order. An index vector is used to point values in the original vecto

Illustration of Nested loops: Running the script shows the output: >> printstars ***** ***** ***** The variable rows identifies the number of rows to print, and

Polynomials: Simple curves are polynomials of various degrees, or orders. The degree is the integer of the highest exponent in the expression. The illustrations are as follows

Location of a rectangle - graphics objects: The location of a rectangle is [x y w h], where x and y are the coordinates of the lower left point, here w is the width, and h is