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 the cell arrays: There are several techniques of displaying the cell arrays. The celldisp function shows all elements of the cell array:   >> celldisp(cellro

Illustration of Sorting strings: To sort on the rows rather than second dimension should be specified. >> sort(words,2) ans = Hello Hdowy Hi Gbdeo

Illustration of symbolic variable: When, on the other hand, z is a symbolic variable to start with, quotes are not required around the expression, and the words are automatica

Logical scalar values: The MATLAB also has or and and operators which work element wise for the matrices: These operators will compare any of the two vectors or matric

How can I use the weighted moving average formula in matlab to smooth a column data of 404 values?

function numden: The function numden will return individually the numerator & denominator of a symbolic expression: >> sym(1/3 + 1/2) ans = 5/6 >> [n, d] =

Built-in colormaps: The MATLAB has numerous built-in colormaps which are named; the reference page on colormap shows them. Calling the function colormap without passing any ar

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,

Matrix definitions: As we know the matrix can be thought of as a table of values in which there are both rows and columns. The most common form of a matrix A (that is sometime

Removing Whitespace Characters: The MATLAB has functions which will eliminate trailing blanks from the end of a string and/or leading blanks from the starting of a string.