Matrix with 64 Rows and 16 Columns
1 回表示 (過去 30 日間)
古いコメントを表示
Hello Everyone,
I have the a matrix with 16 coloumns.
Each column I have to split as follows
DataA=(1:2:end)
DataB=(2:2:end)
and save these both matrices seperatly.
Can any helpme?
0 件のコメント
回答 (1 件)
Star Strider
2019 年 5 月 7 日
Please see the documentation section on Matrix Indexing (link). You need a second index to address your matrices. What you do depends on the result you want.
Both of these work. One should produce the desired result (assuming ‘M’ is your (64x16) matrix):
DataA = M(:,1:2:end); % Result Is (64x8)
DataB = M(:,2:2:end); % Result Is (64x8)
DataA = M(1:2:end,:); % Result Is (32x16)
DataB = M(2:2:end,:); % Result Is (32x16)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Interpolation of 2-D Selections in 3-D Grids についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!