フィルターのクリア

How to get value in a column or row

1 回表示 (過去 30 日間)
Tran Hoa
Tran Hoa 2018 年 7 月 30 日
コメント済み: Tran Hoa 2018 年 7 月 30 日
Hi member, I have a matrix Ex a=[1 2 3 5 6 8], and I only want to take b= a(1), a(2) and a(4) : 1,2,5 in stead of the whole column. Can you instruct me to do it. Thank you.

採用された回答

KSSV
KSSV 2018 年 7 月 30 日
a=[1 2 3 5 6 8] ;
idx = [1 2 4] ;
b = a(idx) ;
  1 件のコメント
Tran Hoa
Tran Hoa 2018 年 7 月 30 日
Thank you. It is very useful

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by