フィルターのクリア

extract certain lines in matrice

3 ビュー (過去 30 日間)
Dija
Dija 2015 年 5 月 6 日
コメント済み: Dija 2015 年 5 月 6 日
hi everyone i have this matrice
0.8979 0.8979 0.8979 0.8979 0.8979 0.8979 0.8979 0.8979
0.5934 -0.5934 0.5934 -0.5934 0.5934 -0.5934 0.5934 -0.5934
0.5934 0.5934 -0.5934 -0.5934 0.5934 0.5934 -0.5934 -0.5934
0.8979 -0.8979 -0.8979 0.8979 0.8979 -0.8979 -0.8979 0.8979
0.5934 0.5934 0.5934 0.5934 -0.5934 -0.5934 -0.5934 -0.5934
0.8979 -0.8979 0.8979 -0.8979 -0.8979 0.8979 -0.8979 0.8979
0.8979 0.8979 -0.8979 -0.8979 -0.8979 -0.8979 0.8979 0.8979
0.5934 -0.5934 -0.5934 0.5934 -0.5934 0.5934 0.5934 -0.5934
I want to extract the line 1&2&4&7 in order to put them in another equation can anyone give me the code to put certain lines in another place

採用された回答

Guillaume
Guillaume 2015 年 5 月 6 日
This is very basic matrix indexing which is covered in the Getting started tutorial:
m = [0.8979 0.8979 0.8979 0.8979 0.8979 0.8979 0.8979 0.8979
0.5934 -0.5934 0.5934 -0.5934 0.5934 -0.5934 0.5934 -0.5934
0.5934 0.5934 -0.5934 -0.5934 0.5934 0.5934 -0.5934 -0.5934
0.8979 -0.8979 -0.8979 0.8979 0.8979 -0.8979 -0.8979 0.8979
0.5934 0.5934 0.5934 0.5934 -0.5934 -0.5934 -0.5934 -0.5934
0.8979 -0.8979 0.8979 -0.8979 -0.8979 0.8979 -0.8979 0.8979
0.8979 0.8979 -0.8979 -0.8979 -0.8979 -0.8979 0.8979 0.8979
0.5934 -0.5934 -0.5934 0.5934 -0.5934 0.5934 0.5934 -0.5934];
subm = m([1 2 4 7], :); %select all columns of rows 1, 2, 4 and 7
  1 件のコメント
Dija
Dija 2015 年 5 月 6 日
thank you

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by