Sei sulla pagina 1di 2

Problem 12.

clc
close all
clear all
disp('NAME- RITA MANDARI');
disp('NRP- 0211750020002');
disp('METHOD- LINEAR ALGEBRAIC EQUATION');
disp('PROGRAM- FIG P12.6');
disp('TE MECH - RKE');
disp('**********INPUT****************');

% Define the system of equation


A=[130 30 0;-90 90 0;40 60 -120]
B=[200;0;-500]

% Solve for x in Ax=B using Gauss Elimination


X=inv(A)*B

% Display the results/unknows


c1=X(1)
c2=X(2)
c3=X(3)

disp('**********OUTPUT****************');

Potrebbero piacerti anche