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

2 visualizzazioni (ultimi 30 giorni)
>> 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']);

Risposte (1)

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

Accedi per commentare.

Categorie

Scopri di più su Functions in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by