%**************************************************************************
%*     Problem 8.1                                                        *
%*     filename: problem08_1.m                                            *
%*     Programed by Ryoichi Kawai for Computational Physics Course        *
%*     Revised on 02/10/2019.                                             *
%**************************************************************************
clear all;

% Using MATLAB built-in functions.
R = [[0.36,0.48,-0.80];[-0.80,0.60,0];[0.48,0.64,0.60]];

% inverse
R_inv = inv(R);

% transpose
R_trans = transpose(R);

fprintf('\nTranspose\n')
fprintf('%15.4e %15.4e %15.4e\n',R_trans')
fprintf('\nInverse\n')
fprintf('%15.4e %15.4e %15.4e\n',R_inv')
fprintf('\nDifference\n')
fprintf('%15.4e %15.4e %15.4e\n',R_trans'-R_inv')



