Example of symbolic expression, MATLAB in Mathematics

Example of Symbolic Expression

When there is more than one variable, the MATLAB selects which to solve for. In the illustration below, the equation ax2 + bx = 0 is solved. There are three variables. Since it can be seen from the result, that is given in terms of a and b, the equation was solved for x. The MATLAB has rules built in that to identify how to select which variable to solve for. For illustration, x will always be the first preference if it is in the expression or equation.

>> solve('a*x^2 +  b*x')

ans =

        0

 -b/a

Though, it is possible to identify which variable to solve for:

>> solve('a*x^2 +  b*x','b')

ans =

-a*x

Posted Date: 10/22/2012 6:47:27 AM | Location : United States







Related Discussions:- Example of symbolic expression, Assignment Help, Ask Question on Example of symbolic expression, Get Answer, Expert's Help, Example of symbolic expression Discussions

Write discussion on Example of symbolic expression
Your posts are moderated
Related Questions
If I have a vector representing the packed storage form of a symmetric matrix, how do I perform a cholesky factorisation on that?

Illustration of Spreadsheet Files: This reads the numbers in a double vector variable nums and the text in a cell array txt (the xlsread function forever returns the numbers f

Types of User-defined Functions: We know how to write a user-defined function, stored in an M-file, which computes and returns one value. This is merely one type of the functi

Illustration of Writing to files: Here is the other illustration in which a matrix is written to a file. At First, an arbitrary 2 × 4 matrix is generated, and then it is writt

Applications of Customized Strings: Labels, Prompts, Arguments to Functions: The one of very useful application of this is to involve numbers in strings that are used to plot

Illustration of Empty vectors: The Empty vectors can also be used to delete elements from the arrays. For illustration, to remove the third element from array, an empty vector

Fliplr function: The fliplr function "flips" the matrix from left to right (in another words the left-most column, the first column, become the last column and so on), and the

Strcat function - Concatenation : The strcat function, though, will eliminate the trailing blanks from strings before concatenating. Note that in these illustrations, the trail

Complex numbers: A complex number is commonly written in the form z = a + bi here a is known as the real part of the number z, b be the imaginary part of z, and i is √-1

Counting in a While Loop: Whenever it is not known ahead of the time how many values will be entered into the script, it is often essential to count the number of values which