MATLAB: How to cut dimensions of 3d arrays in a cell. arrayarrayscell arraycell arraysfor loop I have one 34*1 cell. every array in it have 3 dimensions, all same (720*360*365) I want to know how to cut all arrays like this: (700:720 * 300:360 * 🙂 Best Answer B = cell(34,1);for ii = 1:34 B{ii} = precips{ii}(700:720,300:360,:); endThen you will get a new cell, each element of the new cell is of size 21*61*365. Related SolutionsMATLAB: How to turn a number array into a specific string set array_cell = num2str(array) I think is the problem. Try using the num2str within the for loop.for i=1:size(array,2) data{row,i+1} = colorgen(color, num2str(array(i)));end MATLAB: Covert a cell to multidimensional matrix %------------Example---------------------------s=arrayfun(@(x) randi(5,randi(5),100),1:5,'un',0)%---------------the code-------------------------n=max(cellfun(@(x) size(x,1),s))m=size(s{1},2)a=cellfun(@(x) [zeros(n-size(x,1),m);x],s,'un',0)out=cat(3,a) Related QuestionHow to concatenate 2 cell arrays containing stringsHow to concatenate 3D cells arraysHow do i create two multi-dimensional arrays:  a 10 x 10 x 10 numerical array (3-D) anda 5 x 5 x 5 x 5 numerical array (4-D) where each value in each array corresponds to the multiplication of indicesHow to set value of a loop to be the contents of an arrayConvert cell array to 3d arrayA sum of the many 3d arrays (just third dimension, and first and second stay steady)
Best Answer