a = [1 1]; try a == []; diary('TXPackets\log.txt'); catch ErrorInfo disp(ErrorInfo.message); end