LuKr
Followers: 0 Following: 0
Feeds
已回答
Split array according to one column values
B=A(cellfun(@(x) isequal(1,x),{A{:,2}}),:) C=A(cellfun(@(x) isequal(2,x),{A{:,2}}),:) Maybe like this?
Split array according to one column values
B=A(cellfun(@(x) isequal(1,x),{A{:,2}}),:) C=A(cellfun(@(x) isequal(2,x),{A{:,2}}),:) Maybe like this?
6 years 前 | 1
已回答
How to clear out rows of zeros in a matrix?
If A is your matrix: A(A(:,1)==0,:)=[]
How to clear out rows of zeros in a matrix?
If A is your matrix: A(A(:,1)==0,:)=[]
6 years 前 | 0