Changing size (3D to 4D)

2 ビュー (過去 30 日間)
Cinar Gulleroglu
Cinar Gulleroglu 2020 年 12 月 14 日
編集済み: KALYAN ACHARJYA 2020 年 12 月 14 日
How to change a matrix's size from 10000x40x40 to 10000x40x40x1

回答 (1 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 12 月 14 日
編集済み: KALYAN ACHARJYA 2020 年 12 月 14 日
data=rand(10000,40,40);
result=reshape(data,[10000,40,40,1]);
Is there any sense? data (10000,40,40) might considering same for (10000,40,40,1). There might be no difference to implement 1 more dimemtion, which olready have in space vector,
e.g.
>> data=rand(3,3);
>> data(2,3,1,1)
ans =
0.7719

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by