MATLAB Answers

selection of rows in a matrix

1 view (last 30 days)
how to select only few rows in a matrix
36 13
9 21
23 32
35 5
3 43
in ths five elements i have select only 3 rows which is
36 13
23 32
3 43
which is row 1, row 3, row 5

  0 Comments

Sign in to comment.

Accepted Answer

Alex Mcaulley
Alex Mcaulley on 24 Oct 2019
A = [36 13
9 21
23 32
35 5
3 43]
B = A([1,3,5],:)

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.