Programmatically create, modify, and view an annotation.
Open a new model.
open_system(new_system)
Create an annotation with default properties using the Simulink.Annotation function.
a = Simulink.Annotation(gcs,'This is an annotation.');
After creating the annotation, use dot notation to set property values. For example, apply an 18-point font and light blue background to the annotation.
a.FontSize = 18;
a.BackgroundColor = 'lightBlue';
To view and briefly highlight the new annotation, use the view function.