Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Matlab Vectorisation with cell help

1 vue (au cours des 30 derniers jours)
MR. W
MR. W le 20 Avr 2015
Clôturé : MATLAB Answer Bot le 20 Août 2021
Hi, I'm new in matlab and facing some processing speed problem on the coding. So i had read and try to work with vectorisation and it didnt seem work, my example code is as below:
for i = 1:length_branch_point
branch_crop{i} = imcrop(I_resize,[ (branch_point_x(i)-3) (branch_point_y(i)-3) 6 6]);
branch_crop{i} = imresize(branch_crop{i}, [7 7]);
branch_lai{i} = mean2(branch_crop{i});
branch_lid{i} = std2(branch_crop{i});
end
where branch_point_x = [1 2 3] and branch_point_y = [3 4 5]
Can someone show me an example on how to vectorise the code above? Thanks in advance.

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by