Chapter1 - % Chapter 1 Numerical Solutions AutoOverWrite On...

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

View Full Document Right Arrow Icon
Sheet1 Page 1 % Chapter 1 Numerical Solutions AutoOverWrite On % Linear algebraic equations %------------------------------------------------------------- % One linear equation Variable x Equation = 3*x + 9*sin(t) - 12 Solve( Equation, x ) Pause %------------------------------------------------------------- % Two linear equations Variable y, z Zero[1] = 3*y + 2*z + 9*sin(t) - 12 Zero[2] = 2*y + 4*z + 5*cos(t) - 11 Solve( Zero, y, z ) Pause %------------------------------------------------------------- % Four linear equations Variable x{1:4} Eqn[1] = 3*x1 + 2*x2 + 2*x3 + 3*x4 - 9*sin(t) Eqn[2] = 2*x1 + 4*x2 + 2*x3 + 3*x4 - 5*cos(t) Eqn[3] = 4*x1 + 5*x2 + 6*x3 + 7*x4 - 11 Eqn[4] = 9*x1 + 8*x2 + 7*x3 + 6*x4 - 15 Solve( Eqn, x1, x2, x3, x4 ) Pause %------------------------------------------------------------- % Nonlinear algebraic equations %------------------------------------------------------------- % One polynomial equation polynomial = [1, 2, 3, 5, 9, 17] p = roots( polynomial ) Pause
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/13/2011 for the course EGM 3400 taught by Professor Matthews during the Spring '08 term at University of Florida.

Page1 / 2

Chapter1 - % Chapter 1 Numerical Solutions AutoOverWrite On...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online