symbolic - Symbolic Computations CSC 113 Fall 2010...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
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 . Lets return to the earlier equation: D = D e- Q...
View Full Document

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 Right Arrow Icon
Ask a homework question - tutors are online