Clear Filters
Clear Filters

How to extract information from matrix?

2 views (last 30 days)
Firas Al-Kharabsheh
Firas Al-Kharabsheh on 25 Apr 2016
Edited: dpb on 25 Apr 2016
If i have this matrix
B = [ 1 1 0 1
0 0 0 0
0 1 0 0
0 1 0 0 ]
how i can in some way to extract these information
  • 1 1 0 1 , 1st row
  • 1 0 1 1 , second column

Answers (1)

dpb
dpb on 25 Apr 2016
Edited: dpb on 25 Apr 2016
R=B(1,:);
C=B(:,2);
Read and work through the "Getting Started" tutorial on Matlab basics...or more specifically, read
doc colon

Categories

Find more on Matrices and Arrays 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!