How to extract information from matrix?

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

Respuestas (1)

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

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Preguntada:

el 25 de Abr. de 2016

Editada:

dpb
el 25 de Abr. de 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by