DocumentationHelp Center
Delete annotation
delete(a)
example
delete(a) deletes the specified annotation.
a
collapse all
Programmatically delete an annotation.
Open the vdp model.
vdp
To get the handles for the annotations in the model, use the find_system function.
find_system
h = find_system(gcs,'FindAll','on','Type','annotation');
To identify the annotations, query the text inside the annotations.
get_param(h,'PlainText')
ans = 2x1 cell {'Copyright 2004-2020 The MathWorks, Inc.'} {'van der Pol Equation' }
To delete the title of the model ('van der Pol Equation'), get the Simulink.Annotation object that corresponds to the second handle.
'van der Pol Equation'
Simulink.Annotation
a = get_param(h(2),'Object');
Delete the annotation from the model.
Annotation, specified as a Simulink.Annotation object.
setImage | Simulink.Annotation | view
setImage
view
A modified version of this example exists on your system. Do you want to open this version instead?
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office