フィルターのクリア

Could anyone please help me how to split a single matrix into two separate matrix with odd number of rows and even number of rows

3 ビュー (過去 30 日間)
I am having a matrix
A= 20x20 double
From A, I want to split it into two matrices B =20x10 double and C=20x10 double
In specific I used the command
B=A(:,1);
C=A(:,2);
where i can get B=20x1 double and C=20x1 double.
But now I want to get B=A(:,1); (:,3),(:,5),...,(:,19) and C=A(:,2), (:,4), (:,6),...,(:20).
Could anyone please help me on this.

採用された回答

KSSV
KSSV 2021 年 7 月 16 日
O = A(:,1:2:end) ;
E = A(:,2:2:end) ;

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by