Demo entry 6633540

Exercicio

   

Submitted by Gustavo on Aug 02, 2017 at 23:01
Language: Matlab. Code size: 367 Bytes.

clear all
close all
clc

syms x1 x2 x3;
X=[x1 x2 x3];

A=[1 2 4; -3 -1 4; 2 14 5];
R=[13;8;50];
C=[A R]

%ETAPA 1

C=substituicao(C,2,1);
C

%Etapa 2

C=substituicao(C,3,2);
C

if C(2,1)==C(3,1)==C(3,2)==0
    X(1,3)=(C(3,3)/C(3,4));
    X(1,2)=(C(2,4)-C(2,3)*X(1,3))/C(2,2);
    X(1,1)=(C(1,4)-C(1,3)*X(1,3)-C(1,2)*X(1,2))/C(1,1)
    
end

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).