MATLAB: I want to take each row in matrix MATLABmatrix i have matrix 7*3 i want to take 001 in the first 011and in the second Best Answer Trivial with the color operator:clcdata=[0 0 ;0 0 1;0 0 1;1 1 1;0 1 1;1 0 1;1 1 1];for n=1:size(data,1) tmp=data(n,:); %do something useful with tmp disp(tmp)end Related SolutionsMATLAB: How can i can convert A matrix to the type i want A(1:size(A,1)+1:end) = 0 MATLAB: Take second element of cell Here's one way. I needed to make the temporary variable to accommodate the way you are handling the cell array element whose vector is length 1.tmp = cellfun(@(x)[x 0],a,'UniformOutput',false);b = cellfun(@(x)x(2),tmp)clear tmp Related QuestionSort rows based on number of 1’s in each row.Please take a lookTake lines from arrayHow can i seperate columns by comparing the values of first rowFaster winner takes all
Best Answer