Simplification functions, MATLAB in Engineering

Simplification Functions:

There are numerous functions which work with expressions, and simplify the terms. Not all the expressions can be simplified, but the simplify function does anything it can to simplify expressions, involving gathering like terms. For illustration:

>> x = sym('x');

>> myexpr = cos(x)^2 + sin(x)^2

myexpr =

cos(x)^2 sin(x)^2

>> simplify(myexpr)

ans =

1

The functions expand, collect, and factor work with polynomial expressions. The collect function collects the coefficients, for illustration,

>> x = sym('x');

>> collect(x^2 + 4*x^3 + 3*x^2)

ans =

4*x^2 4*x^3

Posted Date: 10/22/2012 4:35:07 AM | Location : United States







Related Discussions:- Simplification functions, Assignment Help, Ask Question on Simplification functions, Get Answer, Expert's Help, Simplification functions Discussions

Write discussion on Simplification functions
Your posts are moderated
Related Questions
Forward elimination: In forward elimination, we want to obtain a 0 in the a 21 position. To accomplish this, we can alter the second line in the matrix by subtracting from it

Illustration of Graphics properties: A particular property can also be exhibited, for illustration, to view the line width:     >> get(hl,'LineWidth')     ans =

Data structures: The Data structures are variables which store more than one value. In order to made sense to store more than one value in a variable, the values must in some

Algorithm for expfn function: The algorithm for expfn function is as shown:  receives the value of x as the input argument.  Prints the value of exp(x).  assigns a

Illustration of Matrix solutions: For illustration, consider the three equations below with 3unknowns x 1 ,x 2 , and x 3 : We can write this in the form Ax = b here A

Creating Cell arrays: There are many ways to create cell arrays. For illustration, we will create a cell array in which one element will store an integer, one element store ch


Finding a sting - function strfind: The function strfind does necessarily similar thing, except that the order of the arguments does make dissimilarity. The common form is str

Calling of Function polyval: The curve does not appear very smooth on this plot, but that is as there are only five points in the x vector. To estimate the temperature

Illustration of gauss-jordan elimination: An illustration of interchanging rows would be r1 ¬→ r3, that would results: Now, beginning with this matrix, an illustration of sc