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

Algorithm for subfunction: The algorithm for subfunction askforn is as shown:  Prompt the user for the positive integer n.  Loop to print an error message and reprom

Illustration of if - else statement: The one application of an if-else statement is to check for errors in the inputs to a script. For illustration, a former script prompted t

I have a 400x2 vel.dat and 20x2 xy.dat file, how can i plot a streamslice graph on matlab with this two files.

Forward elimination: In forward elimination, we want to obtain a 0 in the a 21 position. To accomplish this, we can alter the second line in the matrix by subtracting from it

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

Replacement : Replace a row by adding it to (or subtract from it) a multiple of the other row. For a given row ri, this is written as   ri  - srj →  ri Note that when r

Technique to create Nested structures: This technique is the most proficient. Though, the other technique is to build the nested structure one field at a time. As this is a ne

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

Use of While loop: Here is an illustration of calling the function, passing 5000 for the value of the input argument high. >> factgthigh(5000) ans = 5040 The itera