I began to trick the previous question, trying to dynamically figure out which fields can be set.
I was not able to get it to work, but I was able to get (most) read-only properties using the difference between the returned values โโof set(h) and get(h) .
The only property that does not appear here is Parent -property, which is customizable but should not be changed in the previous question.
This is how I got the non-selectable properties:
h = plot(1:0.2:10); xx=get(h) close all h2 = plot(0); settableHandles = set(h2); settableNames = fieldnames(settableHandles); allHandles = get(h2); allNames = fieldnames(allHandles); nonSettableHandles = rmfield(allHandles,settableNames); nonSettableNames = fieldnames(nonSettableHandles)
This creates a nonSettableNames cell:
nonSettableNames = 'Annotation' 'BeingDeleted' 'Type'
source share