Matrix reduction from large matrix data.

2 ビュー (過去 30 日間)
Nedz
Nedz 2020 年 10 月 16 日
コメント済み: KSSV 2020 年 10 月 16 日
I have an input training data of dimension 10,451 by 41.
How can i form a 3 by 3 matrix from each of the row (1 by 41)???
  2 件のコメント
Durganshu
Durganshu 2020 年 10 月 16 日
Please elaborate on what is the basis of your matrix reduction. Are you trying to implement something like PCA?
KSSV
KSSV 2020 年 10 月 16 日
As you have 41 elements in a row.....it is tough to divide them into 3*3 matrices as you will be left with some elements left or append extra zeros/ nans to the array.
A = rand(1,41) ;
B = reshape(A(1:36),3,3,[]) ; % 36 because it is divisble by 9
Anew = [A NaN(1,4)] ;
Bnew = reshape(A,3,3,[]) ; % append nans to make A of length 45

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

回答 (0 件)

カテゴリ

Help Center および File ExchangePattern Recognition and Classification についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by