inputdlg does not work Matlab 2020a

조회 수: 5 (최근 30일)
Dirac Philus
Dirac Philus 2020년 11월 24일
댓글: Dirac Philus 2020년 11월 24일
when including "inputdlg" in a simple script I recieve the following error:
Error using matlab.graphics.Graphics/set
Unrecognized property Units for class AnnotationPane.
Error in inputdlg (line 340)
set(findall(InputFig),'Units','normalized','HandleVisibility','callback');
the dialog box opens but the 'ok' and 'cancel' buttons can't be pressed and the only option is to close the window.
I checked that it is not a syntax problem by copying the inputdlg example code from Mathworks, https://www.mathworks.com/help/matlab/ref/inputdlg.html
  댓글 수: 1
Jan
Jan 2020년 11월 24일
Please post a piece of code, which reproduces the problem.
Did you shadow a builtin function? This can happen when folders with user-defined functions are stored in the path before Matlab's toolboxes.

댓글을 달려면 로그인하십시오.

답변 (1개)

Jan
Jan 2020년 11월 24일
User the debugger to find out more details. Type in in the command window:
dbstop if caught error
Now run the code again and check, which line is failing and the values of the used variables.
  댓글 수: 1
Dirac Philus
Dirac Philus 2020년 11월 24일
Thanks.
Here's a simple script:
%Testing input dlg error:
prompt = {'Enter matrix size:','Enter colormap name:'};
dlgtitle = 'Input';
dims = [1 35];
definput = {'20','hsv'};
answer = inputdlg(prompt,dlgtitle,dims,definput);
and here is what I get after running the debugger:
Caught-error breakpoint was hit in helpviewFactory>helpviewFactory.get_location_for_topic at line 60. The error was:
Error using helpUtils.csh.helpviewFactory/get_location_for_topic (line 60)
Java exception occurred:
com.mathworks.help.helpui.HelpTopicException: <html><body>Topic error_hg_InvalidProperty not found for product MATLAB.</body></html>
at com.mathworks.help.helpui.DocSetItemTopicCshRetriever.getCshResultForTopic(DocSetItemTopicCshRetriever.java:63)
at com.mathworks.help.helpui.TopicCshRetriever.getUrlForTopic(TopicCshRetriever.java:59)
at com.mathworks.help.helpui.TopicUrlRetriever.getLocationForTopic(TopicUrlRetriever.java:30)
does that make any sense to you? Thanks again...

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Performance and Memory에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by