How to get properties of Area Annotation in Matlab R2015a from Command Prompt?

2 ビュー (過去 30 日間)
Ami Shah
Ami Shah 2015 年 12 月 23 日
回答済み: Monika Jaskolka 2019 年 8 月 31 日
I want to get ‘AreaColor’ and ‘Border’ properties of ‘Area’ from command prompt. How can I get ‘Area annotation’ used in Simulink model? There is no help about this in help document.
Please please help me.

採用された回答

Image Analyst
Image Analyst 2015 年 12 月 23 日
Did you try hitting the tab key after the dot? Like when you're typing >> Area.[tab key]. It should bring up a list of properties and methods available to that object.
Or you can try methods(Area) as a separate command.
Just a guess since I don't use Simulink, only MATLAB.
  2 件のコメント
Walter Roberson
Walter Roberson 2015 年 12 月 23 日
It is not clear to me that the new Simulink Area Annotations have a corresponding block or function call. I can see from the documentation that they exist but not how they are implemented.
Ami Shah
Ami Shah 2015 年 12 月 24 日
編集済み: Ami Shah 2015 年 12 月 24 日
Hi Image Analyst and Walter Roberson, thank you for your input. I tried following things.
  1. Area.[Tab_Key]
  2. methods(Area)
  3. propeties(Area)
but I didn't get the answer.
I think Area Annotation is consider as of annotation type. when we use
annotations = find_system(bdroot, 'FindAll', 'on', 'Type', 'Annotation');
we get all type of Annotations(i.e. Area Annotation, Text Annotation). There is no any property or any way to get the type of annotation to differentiate between them.
If we know Area Annotation's name we can get it using
annotation = find_system(gcs, 'FindAll', 'on', 'Type', 'Annotation', 'Name', 'XYZ');
but if we want to get all Area Annotations exist in the Simulink Model without Name how to do it?

サインインしてコメントする。

その他の回答 (1 件)

Monika Jaskolka
Monika Jaskolka 2019 年 8 月 31 日
a = find_system(gcs, 'FindAll', 'on', 'Type', 'Annotation', 'AnnotationType', 'area_annotation')
Valid properties of annotations are listed here: https://www.mathworks.com/help/simulink/slref/simulink.annotation.html

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by