How to extract information from matrix?

1 回表示 (過去 30 日間)
Firas Al-Kharabsheh
Firas Al-Kharabsheh 2016 年 4 月 25 日
編集済み: dpb 2016 年 4 月 25 日
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

回答 (1 件)

dpb
dpb 2016 年 4 月 25 日
編集済み: dpb 2016 年 4 月 25 日
R=B(1,:);
C=B(:,2);
Read and work through the "Getting Started" tutorial on Matlab basics...or more specifically, read
doc colon

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by