MATLAB Answers

JL
0

determine minimum from the first column values of matrix and removing the rest of the rows

Asked by JL
on 14 Sep 2019
Latest activity Commented on by JL
on 14 Sep 2019
Hi everyone, I would like to select only the min of matrix, E from values of the first column of the matrix
E = [0.1 1 19 18 4 3 0 0 0 0 0 0
0.8 1 19 2 3 0 0 0 0 0 0 0
0.2 1 2 3 0 0 0 0 0 0 0 0
];
Results should be:
G = [0.1 1 19 18 4 3 0 0 0 0 0 0
];

  0 Comments

Sign in to comment.

1 Answer

Answer by Bruno Luong
on 14 Sep 2019
 Accepted Answer

[~,imin] = min(E(:,1));
G = E(imin,:)

  1 Comment

Sign in to comment.