|
Hi! Consider this:
>> clear M, M(:,:,:,1,:)=rand(10,10,2,1,5); size(M)
ans =
10 10 2 1 5
>> clear M, M(:,:,:,1,:)=rand(10,10,1,1,5); size(M)
ans =
10 10 5
>> clear M, M(:,:,1,1,:)=rand(10,10,1,1,5); size(M)
ans =
10 10 1 1 5
Why doesn't the 2nd code line behave like the 1st one and the 3rd one do? (i.e. maintaining the 5-D shape of the array)
Isn't a colon allowed to represent a singleton dimension? (3rd dimension in the second code line)
Can you please pinpoint the according passage in the documentation?
Thank you!
|