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

2 Ansichten (letzte 30 Tage)
>> 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']);

Antworten (1)

Jan
Jan am 16 Apr. 2018

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 Kommentare
sangram more
sangram more am 16 Apr. 2018
Bearbeitet: Jan am 16 Apr. 2018
this was the code
function s = int2str(x)
[DELETED]
% Copyright 1984-2010 The MathWorks, Inc.
[DELETED]
Jan
Jan am 16 Apr. 2018
Bearbeitet: Jan am 16 Apr. 2018
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?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Functions finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by