Displaying expressions, MATLAB in Engineering

Assignment Help:

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])


Related Discussions:- Displaying expressions

Sorting vectors of structures, Sorting Vectors of structures: Whenever...

Sorting Vectors of structures: Whenever working with vector of structures, it is very common to sort based on a particular field within the structures. For illustration, recal

Technique is to create one element - vector, Technique is to create one ele...

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,

Algorithm for the function explaine, Algorithm for the function explaine: ...

Algorithm for the function explaine: The algorithm for the function explaine is as shown:  Print a description of e, the exp function, and how to find the approximate va

Function rmfield - structure, Function rmfield - structure: The functi...

Function rmfield - structure: The function rmfield eliminates a field from the structure. It returns a new structure with field eliminated, but does not modify the original st

Related structure functions, Related Structure Functions: There are ma...

Related Structure Functions: There are many functions which can be used with structures in a MATLAB. The function isstruct will return 1 for logical true when the variable arg

Sort algorithm for sorting vectors of structures, Sort algorithm for Sortin...

Sort algorithm for Sorting vectors of structures: Note that only the price field is compared in the sort algorithm, but the whole structure is replaced. That is therefore each

Str2num function - string, str2num function - String: The function str2...

str2num function - String: The function str2num does the opposite; it takes the string in which a number is stored and converts it to the type double: >> num = str2num('123.

Matrix multiplication, Matrix Multiplication: The Matrix multiplicatio...

Matrix Multiplication: The Matrix multiplication does not mean multiplying term by term; and it is not an array operation. The Matrix multiplication has a very particular mean

Video shot boundary detection, I dont know how to input different videos o...

I dont know how to input different videos on matlab program

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd