# Mathlab Practice

itmy

• View
54

0

Embed Size (px)

Citation preview

• 5/20/2018 Mathlab Practice

1/14

Mathlab PracticeNumerical MethodsElectrical Engineering

• 5/20/2018 Mathlab Practice

2/14

(I) Penyelesaian persamaan non-linier (cont.)

instruksi berikut ini:>> f='x^3-x^2-14*x+24>> fplot(f,[-6 8])

Misalkan terdapat permasalahn sistem akar untuk

menyelesaikan Fungsi berikut ini:F(x)=x3 - x2- 14x + 24

• 5/20/2018 Mathlab Practice

3/14

Penyelesaian persamaan non-linier(cont)

• 5/20/2018 Mathlab Practice

4/14

I.a. Solusi Pers.Non Linier (metode bisection)

x

f(x)

xux

x

f(x)

xux

xm

xx

m =xu

2

• 5/20/2018 Mathlab Practice

5/14

I.b. Solusi Pers.Non Linier (metode newton-raphson)

• 5/20/2018 Mathlab Practice

6/14

I.c. Solusi Pers.Non Linier (metode secant)

• 5/20/2018 Mathlab Practice

7/14

Solusi Persamaan Linier

Given these assumptions, Kirchhoff.s current

rule is applied at each node to yield

Fig. 2. Assumed current directions

Fig 1. A resistor circuit to be solved using

simultaneous linear algebraic equations.Application of the voltage rule to each of the

two loops gives

or, substituting the resistances from Fig 1 and

bringing constants to the right-hand side,

• 5/20/2018 Mathlab Practice

8/14

Therefore, the problem amounts to solving six equations with six

unknown currents. These equations can be expressed in matrix form as

The solution with MATLAB is

• 5/20/2018 Mathlab Practice

9/14

MATLAB Matrix Manipulations

Create a 3 3 matrix:

• 5/20/2018 Mathlab Practice

10/14

MATLAB Matrix Manipulations

Create a tranpose matrix:

• 5/20/2018 Mathlab Practice

11/14

MATLAB Matrix Manipulations

Create a inverse matrix:

• 5/20/2018 Mathlab Practice

12/14

SOLVING LINEAR ALGEBRAIC EQUATIONS WITH MATLAB

Find the solution of linear equation :

Employing left division yields

• 5/20/2018 Mathlab Practice

13/14

SOLVING LINEAR ALGEBRAIC EQUATIONS WITH MATLAB

Find the solution of linear equation :

Alternatively, multiplying the inverse of the coefficient matrix by

the right-hand-side vector gives the same result:

• 5/20/2018 Mathlab Practice

14/14