clc clear all disp('PURPOSE') disp(' Example of using matrices') % INPUT MATRICES a=[1 2 6; 2 65 1; 4 2 1]; b=[2 3 4; 2 1 45; 9 3 6]; % CODE % a) Adding the two matrices % [a]+[b]=[c] c=a+b; % b) muliply [a]*[b]=[d] d=a*b; % c) scaler product of 2[a][b] e=2.*[a].*([b]); % DISPLAY INPUTS/OUTPUTS disp('INPUTS') disp(' Input matrix [A]:') disp(a) disp(' Input matrix [B]:') disp(b) disp('OUTPUTS') disp(' a) Resulting matrix:') disp(c) disp(' b) Resulting matrix:') disp(d) disp(' c) Resulting matrix:') disp(e)