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

2 views (last 30 days)
>> 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']);

Answers (1)

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

Sign in to comment.

Categories

Find more on Functions in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!