% Unit 2 (MATLAB Course @ UAM)
% (c) Alexander Knebe

clear all
close all
clc

a=[1 2 3 4 5 6];
A=diag(a);

% fill all zero elements of A with a -1
A(find(A==0))=-1