Deleting a handle array.

9 ビュー (過去 30 日間)
Ryan
Ryan 2013 年 2 月 28 日
I'm trying to add multiple ROIs to an image using imroi. All of the handles are stored in an array variable. I want to delete all of the rois from the image simultaneously. I've tried delete(handle_array) and get the following error:
Function 'subsindex' is not defined for values of class 'imrect'.
Is there a better way to do this? Thank you.

採用された回答

Sean de Wolski
Sean de Wolski 2013 年 2 月 28 日
Can you provide repro code? Do you have a variable named delete
This works fine for me:
for ii = 3:-1:1
h(ii) = imrect;
%draw them
end
%Works for me:
delete(h)

その他の回答 (1 件)

Ryan
Ryan 2013 年 3 月 1 日
Sorry for the delayed response. I tried as you did, and it worked.
Thanks!

Community Treasure Hunt

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

Start Hunting!

Translated by