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
Example Exit modular program: In the illustration below, the user  Chose the Limit; -   Whenever prompted for n, entered the two invalid values before finally ente

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,

Storing Strings in Cell Arrays: The one good application of a cell array is to store strings of various lengths. As cell arrays can store various types of values in the elemen

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

Function used in sound files: The MATLAB has numerous other functions which let you read and play sound or audio files. In the audio files, sampled data for each audio channel

Examine exponential function: The algorithm for the main script program is shown below:  Call a function eoption to show the menu and return the user's choice.  Loop

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

Evaluating a string: The function eval is used to compute a string as a function. For illustration, below is the string 'plot(x)'is interpreted to be a call to plot the functi

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,

Passing Structures to Functions: The whole structure can be passed to a function, or separate fields can be passed. For illustration, here are the two distinct versions of a f