フィルターのクリア

Converting a 4d vector to 2d vector

4 ビュー (過去 30 日間)
Basu Sau
Basu Sau 2019 年 2 月 23 日
コメント済み: Basu Sau 2019 年 2 月 23 日
Dear
I would like to convert the following 4d vector to a 2d vector.
input:
Y(:,:,1,1)=0
Y(:,:,2,1)=1
Expected output:
Y1(1,1)=1
Y1(1,2)=2
Thanks,

採用された回答

Jos (10584)
Jos (10584) 2019 年 2 月 23 日
Y = randi(10,1,1,3,4)
Y2 = squeeze(Y) % remove singleton dimensions
help squeeze
  1 件のコメント
Basu Sau
Basu Sau 2019 年 2 月 23 日
thanks jos

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by