Differential equation problem 3 Solving systems of equations

Differential equation problem.

3. Solving systems of equations using Matlab. If you set up a system Ar b, you can ask Matlab to solve for r by giving the command Alb. For each of the systems of equations below, use Matlab to solve the system. Three answers are required for each problem, A, b, and the r that Matlab found. T1 I1

Solution

(a)

A=[1 0 -1;3 1 1;-1 1 2]

A =

     1     0    -1
     3     1     1
    -1     1     2

>> B=[0;1;2]

B =

     0
     1
     2

>> x=A\\B

x =

   -0.3333
    2.3333
   -0.3333

(b)

A=[2 2 -1;2 1 1;1 -1 2]

A =

     2     2    -1
     2     1     1
     1    -1     2

>> B=[2;1;-1]

B =

     2
     1
    -1

>> x=A\\B

x =

     0
     1
     0

(c)

A=[1 2 -1;2 1 1;1 -1 2]

A =

     1     2    -1
     2     1     1
     1    -1     2

>> B=[1;-1;2]

B =

     1
    -1
     2

>> x=A\\B
Warning: Matrix is singular to working precision.

Differential equation problem. 3. Solving systems of equations using Matlab. If you set up a system Ar b, you can ask Matlab to solve for r by giving the comman
Differential equation problem. 3. Solving systems of equations using Matlab. If you set up a system Ar b, you can ask Matlab to solve for r by giving the comman

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site