Symbolic variables and expressions, MATLAB in Engineering

Symbolic Variables and expressions:

The MATLAB has a type known as sym for the symbolic variables and expressions; these work with strings. The illustration, to generate a symbolic variable a and execute the addition, at first a symbolic variable would be generated by passing the string 'a' to the sym function:

>> a = sym('a');

>> a+a

ans =

2*a

 

Also the Symbolic variables can store expressions. For illustration, the variables b and c store symbolic expressions as:

>> b = sym('x^2');

>> c = sym('x^4');

Posted Date: 10/22/2012 4:30:33 AM | Location : United States







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

Write discussion on Symbolic variables and expressions
Your posts are moderated
Related Questions
Set Operations: The MATLAB has numerous built-in functions which perform set operations on vectors. These involve intersect, union, setdiff, unique, and setxor. All these func

Forward substitution: The Forward substitution (done methodically by first getting a 0 in the a 21 place, and then a 31 , and lastly a 32 ): For the Gauss technique,

Patch function - graphics objects: The patch function is used to generate a patch graphics object, which is made from 2-dimensional polygons. The patch is defined by its verti

Function fieldnames - structure functions: The function fieldnames will return the names of the fields which are contained in the structure variable. >> pack_fields = fiel

Expanding a function: The expand function will multiply out terms, and factor will do the opposite: >> expand((x+2)*(x-1)) ans = x^2 x-2 >> factor(ans)

Technique is to create one element - vector: Technique is to create one element with the values from one structure, and use repmat to replicate it to the preferred size. Then,

Example of image processing: The other illustration generates a 5 × 5 matrix of arbitrary integers in the range from 1 to the number of colors; the resultant image is as shown

Gauss Elimination: The Gauss elimination technique consists of:    Generating the augmented matrix [A b]    Applying EROs to augmented matrix to obtain an upper trian

Vector operations: As vectors are special cases of matrices, the matrix operations elaborated (addition, subtraction, multiplication, scalar multiplication, transpose) work on

Anonymous Functions: The anonymous function is a very easy, one-line function. The benefit of an anonymous function is that it does not have to be stored in an M-file. This ca