Displaying expressions, MATLAB in Engineering

Displaying expressions:

The good-looking function will show such expressions by using exponents; for illustration,

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

b =

x^2

>> pretty(b)

                 x

2

 

There are many plot functions in a MATLAB with names starting with "ez" which perform the essential conversions from symbolic expressions to numbers and plot them. For illustration, the function ezplot will draw a 2-D plot in the x-range from -2π to 2π, with the expression as the title. The expression

>> ezplot('x^3 + 3*x^2 - 2')

generates the figure as shown in figure.

159_Displaying expressions.png

The domain for the ezplot function can also be identified; for illustration, to change the x-axis to be from 0 to π, it is identified as a vector. The result is as shown in figure.

>> ezplot('cos(x)',[0 pi])

Posted Date: 10/22/2012 4:37:36 AM | Location : United States







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

Write discussion on Displaying expressions
Your posts are moderated
Related Questions
Dot Product: The dot or inner product of two vectors a and b is written as a • b and is defined as  In another words, this is like matrix multiplication when multiplyi

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

Converting between the String and Number types: The MATLAB has many functions which convert numbers to strings in which each character element is a separate digit, and vice ve

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

IS Functions in Matlab: There are many functions which are built into MATLAB which test whether or not something is true; these function names start with the word is. As these

Function cirarea - Anonymous functions: The function handle name is cirarea. The one argument is passed to the input argument radius. The body of the function is an expression

Binary Search: The binary search supposes that the vector has been sorted first. The algorithm is just similar to the way it works whenever looking for a name in a phone direc

Vectors of Structures: In numerous applications, involving database applications, information generally would be stored in the vector of structures, instead of in individual s

Illustration of Gauss elimination: For illustration, for a 2 × 2 system, an augmented matrix be: Then, the EROs is applied to obtain the augmented matrix into an upper

Technique to creating this structure: An alternative technique of creating this structure, that is not as efficient, includes using the dot operator to refer to fields in the