Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Matlab Vectorisation with cell help

1 visualizzazione (ultimi 30 giorni)
MR. W
MR. W il 20 Apr 2015
Chiuso: MATLAB Answer Bot il 20 Ago 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.

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by