ghasem_008
Full Member level 4
hi.I have a question.3D arrays in matlab how works?
I have a three-dimensional array in matlab.can anyone tell me that following code how work?
>>x=5;y=5;z=4;
>>a=ones(x+2,y+2,z+2);
>>b=a(2: x+2,2:y+2,2:z+2)-a(1: x,2:y+2,2:z+2);
>>c=find(b>0);
I have 2 questions:
1-what is b?and in other words,three dimensional arrays how work?
2-in line (4),what is output?what is returned to c?can anyone explain by a numerical example or give me a good reference?
thanks alot...
I have a three-dimensional array in matlab.can anyone tell me that following code how work?
>>x=5;y=5;z=4;
>>a=ones(x+2,y+2,z+2);
>>b=a(2: x+2,2:y+2,2:z+2)-a(1: x,2:y+2,2:z+2);
>>c=find(b>0);
I have 2 questions:
1-what is b?and in other words,three dimensional arrays how work?
2-in line (4),what is output?what is returned to c?can anyone explain by a numerical example or give me a good reference?
thanks alot...
Last edited: