I want to split 4D single data (3600*40*40*40) where 3600 is time. I want to split the data for every 36 seconds to get 100 profile containing 36 sec in each profile.

조회 수: 2 (최근 30일)
I want to split 4D single data (3600*40*40*40) where 3600 is time. I want to split the data for every 36 seconds to get 100 profile containing 36 sec in each profile like for first wind data profile it will take 1-36 sec and second data profile it will take 37-72 seconds and so on. Can anyone please help me?

답변 (1개)

DGM
DGM 2022년 2월 7일
Just put it in a cell array:
A = rand(3600,4,4,4); % test array
B = mat2cell(A,repmat(36,1,100),4,4,4)
B = 100×1 cell array
{36×4×4×4 double} {36×4×4×4 double} {36×4×4×4 double} {36×4×4×4 double} {36×4×4×4 double} {36×4×4×4 double} {36×4×4×4 double} {36×4×4×4 double} {36×4×4×4 double} {36×4×4×4 double} {36×4×4×4 double} {36×4×4×4 double} {36×4×4×4 double} {36×4×4×4 double} {36×4×4×4 double} {36×4×4×4 double}

카테고리

Help CenterFile Exchange에서 Cell Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by