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
Reading from a File in a While Loop: Though in most languages the combination of a loop and an if statement would be essential to determine whether or not the elements in a ve

Example of modular program: In a modular program, there would be one main script which calls three separate functions to complete these tasks: A function to prompt an us

A matlab function to calculate filter order

Function strncmp: The function strncmp compares only the first n characters in the strings and ignores the rest. The initial two arguments are strings to compare, and third ar

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

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

Cross Product: The cross or outer product a × b of two vectors a and b is defined only whenever both a and b are the vectors in three-dimensional space, that means that they b

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

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

Splits a string : The strtok function splits a string into pieces; it can be called in many ways. The function receives one string as an input argument. It appears for the fir