App Designer - error using the function 'drawpoint' :

10 ビュー (過去 30 日間)
Lavanya Baskaran
Lavanya Baskaran 2020 年 10 月 26 日
編集済み: Rahul 2024 年 11 月 18 日 4:41
Hi all,
I am working on App Designer, and found a issue with the function 'drawpoint'. Initially I was using MATLAB 2019b, in which i got the below error when using 'drawpoint' property 'LabelAlpha'.
Unrecognized property 'LabelAlpha' for class 'images.roi.Point'.
Then I downloaded MATLAB 2020b, thinking it might be MATLAB version issue, but now I get the below error:
Undefined function 'drawpoint' for input arguments of type 'matlab.ui.control.UIAxes'.
This is my code :
roi = drawpoint(app.UIAxes2,'Color','g');
Pon = roi.Position;
roi.Label = num2str(Pon,3);
roi.LabelAlpha = 0;
Not sure of what is the problem. Awaiting your help.
Thank you.

回答 (1 件)

Rahul
Rahul 2024 年 11 月 15 日 7:34
編集済み: Rahul 2024 年 11 月 18 日 4:41
In order to achieve the desired result of using 'drawpoint' with an AppDesigner's axes and adjust it's 'LabelAlpha' property, consider the following points:
  • As per the documentation of 'drawpoint', the 'LabelAlpha' property was not available in MATLAB 2019a, however it is available with the release MATLAB 2020b. This would explain why you were getting the error- Unrecognized property 'LabelAlpha', while using MATLAB 2019a and not MATLAB 2020b.
  • In MATLAB 2020b, I tried to reproduce the issue, however I wasn't able to do the same, and the 'drawpoint' function was working as expected with 'LabelAlpha' property also working.
Hope this would resolve the issue! Thanks.

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by