# symbolic - Symbolic Computations CSC 113 Fall 2010...

This preview shows pages 1–7. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Symbolic Computations CSC 113 Fall 2010 Conventional Computations Matlab was designed to execute serial computations: value = expression; For example, suppose we have D = D e- Q / RT If we know the values on the right-hand side, we can calculate D : >> D0 = 25; >> Q = 1.6e -19; >> R = 10; >> T = 273; >> D = D0 * exp (-Q /( R*T )); What if instead we know everything except T ? On paper, we could proceed as follows: D = D e- Q / RT ln ( D ) = ln ( D )- Q RT ln D D =- Q RT T =- Q R ln ( D / D ) Can we coerce Matlab into solving for one variable in terms of the others? This is the purpose of symbolic computation (requires the symbolic toolbox, which uses Maple). What if instead we know everything except T ? On paper, we could proceed as follows: D = D e- Q / RT ln ( D ) = ln ( D )- Q RT ln D D =- Q RT T =- Q R ln ( D / D ) Can we coerce Matlab into solving for one variable in terms of the others? This is the purpose of symbolic computation (requires the symbolic toolbox, which uses Maple). Symbolic Variables Symbolic variables look like strings, but can be manipulated according to standard rules of algebra. To define a symbolic variable, use either sym('expression') or syms variables . Examples: >> syms x >> y = 2*( x +3)^2/( x ^2+6* x +9) Alternatively, >> y = sym ( '2*( x +3)^2/( x ^2+6* x +9) ') This does not assign values to x or y , but rather assigns their functional dependence . Let’s return to the earlier equation: D = D e- Q...
View Full Document

{[ snackBarMessage ]}

### Page1 / 18

symbolic - Symbolic Computations CSC 113 Fall 2010...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online