MATLAB: How can i save row value in variable like x(1) metric i have metric row =[1 1 0 0; 1 1 0 0; 0 1 1 0 ; 1 1 0 0] how i can make x(1)=1 1 0 0 and x(2)= 1 1 0 0 and so on Best Answer >> row =[1 1 0 0; 1 1 0 0; 0 1 1 0 ; 1 1 0 0] ;x = row;x(1,:)ans = 1 1 0 0>> x(2,:)ans = 1 1 0 0>> Related SolutionsMATLAB: How can alter this code to select some matrix X={[ 1 1 0;0 1 0;0 0 1 ], [ 0 1 0;1 1 1;1 0 0]... [1 1 1;0 1 0;1 1 0],[1 0 1;1 1 0;1 0 0]}X{2}X{4} MATLAB: How to delete an entire row if a specific column contains a zero Many ways in MATLAB. One way: %create some data X = ones(20,2); X(1:10,2) = 0; indices = find(X(:,2)==0); X(indices,:) = [];Wayne Related QuestionHow to create a row from x(1) to x(n)Sorting permutations of binary variablesCreate x(1) x(2)… variable vector using symWhy is an error in this matrix?
Best Answer