How to resolve the Errors regarding Undefined function 'real' for input arguments of type 'matlab.ui.Figure'.

조회 수: 2 (최근 30일)
>> actup Undefined function 'real' for input arguments of type 'matlab.ui.Figure'.
Error in int2str (line 12) x = real(x);
if true
% code
end
Error in PlotRay (line 52) Ans = inputdlg({...
Error in PlottingTools (line 152) PlotRay([DirInfo.MainWork Def.SubDir]);
Error in AcToolboxFrontEnd (line 298) State = PlottingTools(Def, DirInfo, [], PlotToolsExitStrs);
Error in act (line 3) AcToolboxFrontEnd;
Error in run (line 96) evalin('caller', [script ';']);
Error in actup (line 3) run([cd,'\source\act']);

답변 (1개)

Jan
Jan 2018년 4월 16일

According to the error message, your x is a handle of a figure. Then real() is not defined to convert it.

If you post the related code, we might be able to see, why you assume that x has a numerical value.

  댓글 수: 2
sangram more
sangram more 2018년 4월 16일
편집: Jan 2018년 4월 16일
this was the code
function s = int2str(x)
[DELETED]
% Copyright 1984-2010 The MathWorks, Inc.
[DELETED]
Jan
Jan 2018년 4월 16일
편집: Jan 2018년 4월 16일
I've removed the posted code. There is no reason to publish the copy-righted code of int2str(), but the problem is found in the code, which calls this function. Why does your code try to convert a figure handle to a string in the function PlotRay, line 52?

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

카테고리

Help CenterFile Exchange에서 Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by