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
Plot types: Besides plot and bar, there are another plot types like stem plots, histograms, stem plots, area plots and pie charts, and also other functions which customize the

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

Illustration of Writing variables to a file: For illustration, in the below session in the Command Window, 3 variables are generated; these are then exhibited using who. Then,

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

Nested IF-ELSE statements: The if-else statement is used to select between the two statements. In order to select from more than two statements, the if-else statements can als

Writing variables to a File: The save command is used to write variables to a file, or to append the variables to a MAT-file. By the default, save function writes to a MAT-fil

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

Illustration of Advanced file input and output: For illustration, to refer to the third number in the first element of the cell array: >> subjdata{1}(3) ans =

Symbolic Expression The solve function solves an equation and returns the solution(s) as symbolic expressions. The answer can be converted to numbers by using any numeric funct

Referring to and Modifying the Matrix Elements: To refer to matrix elements, the row and then the column indices are given in parentheses (always the row index initially and t