storing data into a vector within nested for loop

im = imread(im);
im = im2bw(im);
truths = sum(sum(im));
s = size(im);
xtot = s(2);
ytot = s(1);
for xcount = 1:xtot,
for ycount = 1:ytot,
if im(ycount,xcount) == 1
sqrt((xcount-coord(2)).^2+(ycount-coord(1)).^2)
end
end
end
end

Answers (0)

This question is closed.

Asked:

on 19 Mar 2012

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!