i want to take each row in matrix
1 view (last 30 days)
Show older comments
i have matrix 7*3
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/293792/image.png)
i want to take 001 in the first
011and in the second
0 Comments
Accepted Answer
Rik
on 18 May 2020
Trivial with the color operator:
clc
data=[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
0 Comments
More Answers (0)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!