Solving system of equation in matlab
Given system of linear equation
$$3a+2b-c = 10$$
clear; clc;
A = [3,2,-1;-1,3,2;1,-1,-1]
B = [10;5;-1];
% column matrix X = [a;b;c];
X = inv(A)*B;
% or you can use following operation to find the solutions. X = A \ B; (left division operator)
% x [-2,5,-6]