how can i split a 400*400 matrix into smaller one
Show older comments
i have a 400*400 matrix that i want to divid into smaller matrix 40*40.
In fact i have 1000 images that i want to do the same for all then find the corr2 between each sub matrix that is in the exact same position in each image.
any idea?
1 Comment
darova
on 20 Feb 2020
try mat2cell
Accepted Answer
More Answers (1)
Stijn Haenen
on 20 Feb 2020
what about this:
num_list=0:40:400;
data=[];
Image=zeros(400);
for a=1:numel(num_list)-1
for b=1:numel(num_list)-1
data(end+1).subimage=Image(num_list(a)+1:num_list(a+1),num_list(b)+1:num_list(b+1));
end
end
All the subimages are stored in a structure
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!