MATLAB: I need help with matrix problem! MATLABmatrixnoob Hello guys.I am new to matlab.How can i make matrix(7×7) ,main diagonal all zeros, other elements 1? Best Answer >> +~eye(7) ans = 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 Related SolutionsMATLAB: Another Datetime conversion problem! DateStrings = '2019-10-04T11:41:06+01:00';convertDATETIME=datetime(DateStrings,'InputFormat',... 'uuuu-MM-dd''T''HH:mm:ssZ','TimeZone','+0000'); MATLAB: How to convert a 64 bit, two’s complement value(binary vector)[ 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] into a signed integer swapbytes(typecast(uint8(bin2dec(char(reshape(fliplr(A),8,[]).' + '0'))),'int64')) Related QuestionMatrix[1,1,1,1;-1,-1,-1,-1;1,1,1,1] to vector[1,1,1,1,-1,-1,-1,-1,1,1,1,1]Issue with 3Sum problem!
Best Answer