Use MATLAB to solve following system of linear equations 10x
Use MATLAB to solve following system of linear equations
10x2-7x3=3
6x1+2x2+3x3=11
5x1-x2+5x3=9
Solution
main.m
clc;
close all;
clear all;
A = [0 10 -7;6 2 3;5 -1 5]
B = [3; 11; 9]
x=A\\B
Output:
A =
0 10 -7
6 2 3
5 -1 5
B =
3
11
9
x =
1.0000
1.0000
1.0000
