dividing data into sub-data

3 ビュー (過去 30 日間)
Radim Zapletal
Radim Zapletal 2019 年 1 月 24 日
編集済み: Radim Zapletal 2019 年 1 月 24 日
How can I divide multiple data into 2 submultiple data?
I have those data:
-1 1 1 1
-1 -1 -1 1
-1 1 -1 -1
-1 1 1 -1
-1 1 1 -1

回答 (1 件)

Bob Thompson
Bob Thompson 2019 年 1 月 24 日
A = [-1 1 1 1; -1 -1 -1 1; -1 1 -1 -1; -1 1 1 -1; -1 1 1 -1];
B = A(:,1:2);
C = A(:,3:4);
  1 件のコメント
Bob Thompson
Bob Thompson 2019 年 1 月 24 日
Creating arrays from portions of a larger array using the index of the larger array will work for most any scenario, you just need to know what kind of indexing you're looking for. If you could elaborate more on what kind of separation you are looking to perform I could give a more comprehensive answer.

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by