A great piece of code. Just a couple of small additions:
pressing the 'delete' key counts as a letter, rather than a eraser. I put the following string in there:
password = password(1:end-1);
It's basically copying the backspace code, but it kind of makes it look a bit prettier, though don't think it's a full functionality.
Also, clicking the 'cancel' button basically just proceeds with the function. I used close(fig) rather than uiresume(fig) to close the dlg and disable access to the GUI.
Daphne, I assume you solved your earlier issue. Here is how I did it.
% p.ashape contains the indices of 2 nodes for each edge; turn it into a single vector (which will have repeats).
indu=unique(ind,'rows'); %cancel doubles.
Now any hints for putting these in order going around the shape? I don't want to use line as in the example. I would like to manipulate the boundary to fit it to other data distributed on the boundary.