MATLAB: Creating a special matrix create a matrix Hello all, I want to create this matrix A=[0 0 1 1 1;0 1 1 1 0;1 1 1 0 0] How can I get ? Thank you. Best Answer One way:v = [0 0 1 1 1 ];A = [v; circshift(v,[0 -1]); circshift(v,[0 -2])] Related SolutionsMATLAB: Creating a matrix having repeating elements A = kron(eye(5),[1;1])+kron(diag(-ones(4,1),1),[1;1]);out = A(1:5,:);orn = 1:5;A = repmat([1,-1,0,0,0],5,1);out = A(mod(repmat(n,5,1) - ceil(n(:)/2),5)*5 + n(:)); MATLAB: Special legend for special bar plot See if the approach in How to draw bar graph of different colors ? will do what you want. Related QuestionBit missing after circular shiftSpecial sortingI want to circular shift rows of ‘ ww ‘ this circular shift depend on the numbers of ‘r’ array in the order , when the r numbers is change the circular shift is change for the ww array rows .Hi…I am trying to create a mirror image for a matrix.IS it possibleCreate a matrix with Special propertiesHow to create overlapping blocks using a matrix rowsSpecial xlswrite save
Best Answer