%Solution for exercise 7: trisymA.m
%Christoph Erath
clear all;

disp('a)');
A = rand(6,6);
triu(A)
tril(A)

disp('b)');
A = randi([0,8],10,10);

S = triu(A) + triu(A)' - diag(diag(A))
%check whether if S is symmetric or not
any(any(S - S'))

% or in a more convenient way
S = A(symdec(10,0))
any(any(S - S'))
