Symbolic expression, MATLAB in Mathematics

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 function, like double:

>> x = sym('x');

>> solve('2*x^2 + x = 6')

ans =

3/2

   -2

>> double(ans)

ans =

      1.5000

    -2.0000

When an expression is passed to the solve function instead of an equation, it will set the expression equivalent to 0 and solve the resulting equation. For illustration, this will solve

3x2 + x = 0:

>> solve('3*x^2 + x')

ans =

       0

 

 -1/3

Posted Date: 10/22/2012 6:46:39 AM | Location : United States







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

Write discussion on Symbolic expression
Your posts are moderated
Related Questions
Give the formula for a rational function that has a hole at x=7 & vertical asmptote at x=-3/2

Creating string Variables: The string consists of a few numbers of characters (including, possibly, none). These are the illustrations of the strings: '' 'x' 'ca

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

Error-checking for integers: illustrations of running this script as shown below: >> readoneint Enter an integer: 9.5 Invalid! Enter an integer: 3.6 Invalid

Structure Consisting of the Fields A MATLAB can also solve the sets of equations. In this illustration, the solutions for x, y, & z are returned as a structure consisting of th

Built-in function for Differentiation: The MATLAB has a built-in function, diff that returns the differences between consecutive elements in a vector. For illustration, >>

Strings as Vectors: The Strings are considered as vectors of characters-or in another words, a vector in which each and every element is a single character-so numerous vector

Labels and Prompts: The script loads all the numbers from file into a row vector. It then splits the vector; it stores the initial element that is the experiment number in a v

Use of logical vector: Determine how many elements in the vector vec were greater than 5, the sum function can be used on the resulting vector isg: >> sum(isg) ans =

Three-Dimensional Plots: The MATLAB has many functions which will display three-dimensional plots. Most of these functions have similar name as corresponding two-dimensional p