Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction To this point MATLAB has been used to answer questions with a numeric value ▫Variables are assigned specific values ▫Answers are numbers MATLAB.

Similar presentations


Presentation on theme: "Introduction To this point MATLAB has been used to answer questions with a numeric value ▫Variables are assigned specific values ▫Answers are numbers MATLAB."— Presentation transcript:

1 Introduction To this point MATLAB has been used to answer questions with a numeric value ▫Variables are assigned specific values ▫Answers are numbers MATLAB can also solve for symbolic answers ▫Example: Solve a*x + b = 0 for x  Answer: x = -b/a Exact answers can be given instead of numerically rounded results

2 Warm-Up Problem

3 Symbolic Math The symbolic math toolbox can be used to solve many types of problems: ▫Simplifying complicated expressions ▫Solving algebraic equations symbolically ▫Factoring polynomials ▫Differentiation ▫Integration ▫Plotting We will take a look at simplifying, solving, and factoring equations today.

4 Simplifying

5 Collect, Expand, Factor These 3 operations are all performed by simplify Collect(): Collects like terms of the symbolic variable (like x, x 2, etc.) Expand(): Uses polynomial multiplication and trig identities to expand expressions Factor(): Takes a polynomial and determines the factors (opposite of expand) Examples: ▫Try collecting terms in the warm-up problem ▫Expand sin(x-y) ▫Factor the result of the collect command in the first example

6 Solve The solve() command can solve a system of equations ▫If the # of equations is equal to the # of variables, then numerical answers are returned ▫If the # of equations is less than the # of variables, then a symbolic solution is returned, in terms of the symbolic variables Example: syms x y t S = 10*x+12*y+16*t; [xt yt] = solve(S, ‘5*x-y=13*t’) Could gaussian elimination be used to solve this system?

7 Concept Questions If you have 3 unknowns and 2 equations, how many solutions are there? Are you guaranteed solutions?

8 Group Problem

9 For Next Time Homework Due


Download ppt "Introduction To this point MATLAB has been used to answer questions with a numeric value ▫Variables are assigned specific values ▫Answers are numbers MATLAB."

Similar presentations


Ads by Google