MATLAB: Working with even rows MATLABmatrix Hello, I have a matrix 4×4, and I want to find the maximum of all elements which are in even rows. Best Answer X = magic(4);max(X(2:2:end,:)) Related SolutionsMATLAB: How do you bring about all possible combinations from two row vectors Yes. Use NDGRID or MESHGRID, e.g.,>> [x,y]=ndgrid([1,2], [3,4])x = 1 1 2 2y = 3 4 3 4>> z=[x(:),y(:)]z = 1 3 2 3 1 4 2 4 MATLAB: Finding index of minimum of a subset of an array B=A;subset=false(size(A)); subset([2,4],2)=true;B(~subset)=inf;[row,col] = find(B==min(B(:))), Related QuestionHow to select odd and even rows from a text fileReturn all unique rows with unique elementsHow to use ‘for’ in this example
Best Answer