About HPC Systems Software User Guides Education Partners

  / gears / hpc / education / tutorials / matlab / win


Introduction

Definition

Example 01

Example 02

Example 03

Example 04

Example 05

Example 06

Example 07

Example 08

Example 09

Example 10

Example 11

Example 12

Example 13

Example 14

Example 15

Example 16

References

Example 06

The backslash operator \


GIVEN: A System of three algebriac linear equations:

x + 4y - 3z = 1
-3x - 6y + z = 3
2x + 11y -5z = 0

REQUIRED: Solve the system.

SOLUTION: Generate example06.m

a=[1 4 -3; -3 -6 1; 2 11 -5];

b=[1; 3; 0];

solution=a\b

Example
solution =

   -0.6667
   -0.3333
   -1.0000
   

Homework:

a. Solve:

a=[1 -1 3 0; -1 1 -1 0; -1 -2 5 0; 20 10 0 0];

b=[0 0 90 80]';


Please send questions or suggestions about this web page to beatnic@aset.psu.edu

ASET | ITS | Penn State