Hello, I'm unable to reshape my 4-D array for some reason and cannot figure out why. The number of elements in the two arrays are equal. I would like to keep the first dimension (even though it only has one row because it's required for the brain imaging software I'm using). I've pasted my command and the error below.
Thanks in advance, -Erie
frtf_D_epoched = reshape(ctf_dD,1,40,800,75) Error using reshape To RESHAPE the number of elements must not change.
>> size(ctf_dD)
ans =
1 40 60000 1
>> 1*40*60000*1
ans =
2400000
>> 1*40*800*75
ans =
2400000

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2014년 8월 4일

0 개 추천

You are probably using data with different number of elements
Try this
ctf_dD=rand(1,40,60000,1);
b=reshape(ctf_dD,1,40,800,75);

카테고리

도움말 센터File Exchange에서 Vehicle Dynamics Blockset에 대해 자세히 알아보기

질문:

2014년 8월 4일

답변:

2014년 8월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by