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
Displaying expressions: The good-looking function will show such expressions by using exponents; for illustration, >> b = sym('x^2') b = x^2 >> pretty(b)

num2str function: The num2str function, that converts real numbers, can be called in many ways. If only the real number is passed to the num2str function, it will generate a s

Initializing the data structure - Function: Function is shown as:   >> printcylvols(cyls) Cylinder x has a volume of 169.6 Cylinder a has a volume of 100.5

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

Referring to and Showing Cell Array Elements and Attributes: Just as with the other vectors, we can refer to individual elements of the cell arrays. The only difference is tha

Implementation of binary search: The binary search can be implemented as a recursive function. The recursive function below also implements this binary search algorithm. It re

Help command: The help command is used with the script rectarea, the function readlenwid, and the major function printrectarea. To see the first comment in the subfunction, as

Inverse of square matrix: The inverse is, hence the result of multiplying the scalar 1/D by each and every element in the preceding matrix. Note that this is not the matrix A,

Function cellplot - Cell array: The function cellplot place a graphical display of the cell array in a figure Window; though, it is a high-level view and fundamentally just di

Square Matrices: If a matrix has similar number of rows and columns, for illustration, if m == n, the matrix is square matrix. The definitions which follow in this part apply