Symbolic variables and expressions, MATLAB in Engineering

Symbolic Variables and expressions:

The MATLAB has a type known as sym for the symbolic variables and expressions; these work with strings. The illustration, to generate a symbolic variable a and execute the addition, at first a symbolic variable would be generated by passing the string 'a' to the sym function:

>> a = sym('a');

>> a+a

ans =

2*a

 

Also the Symbolic variables can store expressions. For illustration, the variables b and c store symbolic expressions as:

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

>> c = sym('x^4');

Posted Date: 10/22/2012 4:30:33 AM | Location : United States







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

Write discussion on Symbolic variables and expressions
Your posts are moderated
Related Questions
Vector operations: As vectors are special cases of matrices, the matrix operations elaborated (addition, subtraction, multiplication, scalar multiplication, transpose) work on

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

FOR Loop: The for loop, or the for statement, is used whenever it is essential to repeat statement(s) in the script or function, and whenever it is known ahead of time how man

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

Appending variables to the Mat-File: Appending to the file adds to what has been saved in a file, and is accomplished by using the -append option. For illustration, supposing

Plotting File data: It is frequently essential to read data from a file and plot it. Generally, this entails knowing the format of the file. For illustration, let us suppose t

Referring to and Showing Cell Array Elements and Attributes: Just as with the other vectors, we can refer to individual elements of the cell arrays. The only difference is tha

Illustration of Passing arguments to functions: Here is an illustration of calling this function: >> printrand() The random # is 0.94 As nothing is passed to

Example of Menu driven modular program: As an illustration of such a menu-driven program, we will write a program to discover the constant e. The constant e, known as the n

Finding a sting - function findstr: The function findstr receives two strings as input arguments. It finds all the occurrences of shorter string contained by the longer, and r