Basic mathematical operations, MATLAB in Engineering

Basic mathematical operations:

All the basic mathematical operations can be executed on symbolic expressions and variables (example, add, raise to a power, multiply, subtract, divide, etc.).

Here are some illustrations:

>> c/b

ans =


>> b^3

ans =


>> c*b

ans =


>> b + sym('4*x^2')

ans =


It can be view from the last illustration that MATLAB will collect like words in such expressions, adding the x2 and 4x2 to answer in 5x2.

The below generates a symbolic expression by passing a string, but the words are not automatically collected:

>> sym('z^3 + 2*z^3')

ans =

z^3   2*z^3

Posted Date: 10/22/2012 4:31:32 AM | Location : United States

Related Discussions:- Basic mathematical operations, Assignment Help, Ask Question on Basic mathematical operations, Get Answer, Expert's Help, Basic mathematical operations Discussions

Write discussion on Basic mathematical operations
Your posts are moderated
Related Questions
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

Structures: The Structures are data structures which group together values which are logically related in what are known as the fields of structure. The benefit of structures

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

Calling of Function polyval: The curve does not appear very smooth on this plot, but that is as there are only five points in the x vector. To estimate the temperature

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

Illustration of initializing the data structure: illustration of initializing the data structure by preallocating is here as shown: >> cyls(3) = struct('code', 'c', 'dimen

Application: Menu driven Modular Program Numerous longer, more involved programs which have interaction with the user are menu-driven, that means that the program prints a men

Write a program to examine exponential function: We will write a program to examine the value of e and the exponential function. It will be a menu-driven. The menu options wil

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

Tracing of Square matrices: The trace of a square matrix is the addition of all the elements on the diagonal. For illustration, for the preceding matrix it is 1 + 6 + 11 + 16,