MATLAB: How to sum the elements of each corner of a matrix matrix If I have a 4×4 matrix, how do i sum 4 elements in 4 corner of that matrix for example my matrix will be : A=[1 2 3 4; 5 6 7 8 9;10 11 12 13; 14 15 16 17] Thanks you so much Best Answer iwant = A(1,1)+A(1,end)+A(end,1)+A(end,end) Related SolutionsMATLAB: How to compare 3 matrix a=A(:,1:2)D=a(ismember(a,B(:,1:2),'rows') & ismember(a,C(:,1:2),'rows') ,:) MATLAB: Help with Reshaping Multidimensional Arrays reshape(permute(A,[1,3,2]),x*y,3) Related QuestionFAST cornerPointsを使ってのレジストレーションの方法を教えてくださいHow to reshape this matrixI want to sum specific elements in an a 2D matrix
Best Answer