01:198:107 Lecture Notes - Lecture 18: Golden Ratio, Matlab, Symbolic Integration

105 views3 pages
CS 107: Lecture 18: Symbolic Matlab Toolbox
Symbolic objects
Symbolic objects are a special MATLAB data type introduced by the
Symbolic
Math Toolbox software enable you to perform mathematical operations
In the MATLAB workspace analytically, without calculating numeric values
You can use symbolic objects to perform a wide variety of analytical
computations
Symbolic variables
To declare variables x and y as symbolic objects use the syms command
Syms x y
You can manipulate the symbolic objects according to the usual rules of
mathematics
Symbolic numbers
Symbolic Math Toolbox software also enables you to convert numbers to
symbolic objects
To create a symbolic number, use the sym command
Create symbolic expressions
Suppose you want to use a symbolic variable to represent the golden ratio
The command phi=sym(‘(1+sqrt(5))/2’);
Achieves this goal, now you can perform various mathematical operations
phi
Simplify symbolic expressions
You can simplify an answer by entering simplify(f) and get a very short
answer: ans=0
Differentiate symbolic expressions
With the symbolic math toolbox software, you can find
Derivatives of single-variable expressions
Partial derivatives
Second and higher order derivatives
Mixed derivatives
Unlock document

This preview shows page 1 of the document.
Unlock all 3 pages and 3 million more documents.

Already have an account? Log in

Document Summary

Symbolic objects are a special matlab data type introduced by the. Math toolbox software enable you to perform mathematical operations. In the matlab workspace analytically, without calculating numeric values. You can use symbolic objects to perform a wide variety of analytical computations. To declare variables x and y as symbolic objects use the syms command. You can manipulate the symbolic objects according to the usual rules of mathematics. Symbolic math toolbox software also enables you to convert numbers to symbolic objects. To create a symbolic number, use the sym command. Suppose you want to use a symbolic variable to represent the golden ratio. Achieves this goal, now you can perform various mathematical operations phi. You can simplify an answer by entering simplify(f) and get a very short answer: ans=0. With the symbolic math toolbox software, you can find. To differentiate a symbolic expression, use the diff command.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents