close all, clear all, clc;

% Create upper triangular matrix and right-hand side vector.
U = [7 8 9; 0 5 6; 0 0 3]
b = [6 -5 0]'

pause;

% Solve upper triangular matrix system.
x = UpperTriangularSolve(U,b)

pause;

% Compute residual.
norm(b-U*x)