MATLAB: What is degeneracy of matrix A=[-1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1]; homeworkmatrix what is degeneracy of matrix A=[-1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1]; Best Answer Hint: doc diag Related SolutionsMATLAB: -1 and 1 matrix Method One:>> N = 5;>> 2*mod(ndgrid(1:N,1:N),2)-1ans = 1 1 1 1 1 -1 -1 -1 -1 -1 1 1 1 1 1 -1 -1 -1 -1 -1 1 1 1 1 1Method Two:>> 2*(ones(N,1)*mod(1:N,2)).'-1ans = 1 1 1 1 1 -1 -1 -1 -1 -1 1 1 1 1 1 -1 -1 -1 -1 -1 1 1 1 1 1Method Three:>> repmat(2*mod(1:N,2).'-1,1,N)ans = 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 MATLAB: Generating linear array [0 -1 0 1 -2 -1 0 1 2 ……] N = 4;C = cell(1,N);for k = 1:N C{k} = -k:k;endV = [0,C{:}]Giving:V = 0 -1 0 1 -2 -1 0 1 2 -3 -2 -1 0 1 2 3 -4 -3 -2 -1 0 1 2 3 4 Related QuestionPlot +1 +1 -1 -1 rectangular pulseHow to random -1 and 1Normalized data -1 to 1Change from 1 to -1
Best Answer