i have the following code, and what i want to do is somehow make it update each time the value of the component i move, not only the last one. Can anyone help.
close; clear; clc;
compnum = 2;
compdata = [1,0.5,4,4;5.5,0.5,4,2];
for i = 1:compnum
h = imrect(gca, compdata(i,:));
compdata(i,:) = getPosition(h)