AE202 Lecture 6 Symbolic Computation

# AE202 Lecture 6 Symbolic Computation - AE202 Aerospace...

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

AE202 Aerospace Flight Mechanics Lecture 6: Symbolic Computation

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

View Full Document
Symbolic Computation MATLAB symbolic toolbox – lets you perform symbolic (algebraic) manipulations – uses MuPAD as its computer algebra systems (CAS) Allows you to perform: – Linear algebraic operations – Differentiation – Integration – Simplification – Transforms – Variable-precision arithmetic – Equation solving
Symbolic Variables First must create symbolic variables – done with syms command, e.g. – creates 3 symbolic variables named a, b and c – also can use sym(‘someName‘) – can create symbolic numbers. • explicitly • from existing numeric variables syms a b c a = sym('alpha'); b = sym(6); c = sym(A);

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

View Full Document
Symbolic Expressions Can create symbolic expressions – combinations of symbolic and numeric variables e.g. create symbolic variable to represent the Golden ratio now create a symbolic expression 15 2 >> rho = sym('(1 + sqrt(5))/2');   2 21 f >> f=2*rho^2+rho-1; f = 5^(1/2)/2 + 2*(5^(1/2)/2 + 1/2)^2 - 1/2 >> pretty(f) 1/2 / 1/2 \2 5 | 5 1 | 1 ---- + 2 | ---- + - | - - 2 \ 2 2 / 2
Symbolic Expressions >> syms a b c x >> p1=a*x^2+b*x+c; 2 1 () p x ax bx c 2 2 p x dx ex f >> syms d e f >> p2=d*x^2+e*x+f; Consider 2 quadratic functions Can perform simple operations on them: addition / subtraction multiplication division, exp, sin, cos >> p1+p2 ans = c + f + b*x + e*x + a*x^2 + d*x^2 >>p1*p2 ans = (a*x^2 + b*x + c)*(d*x^2 + e*x + f)

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.

## This note was uploaded on 01/26/2012 for the course AE AE 202 taught by Professor Martin during the Spring '09 term at University of Illinois, Urbana Champaign.

### Page1 / 16

AE202 Lecture 6 Symbolic Computation - AE202 Aerospace...

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

View Full Document
Ask a homework question - tutors are online