Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Cannot run the matlab GUIDE

Subject: Cannot run the matlab GUIDE

From: vo quang ha

Date: 24 Sep, 2010 06:58:03

Message: 1 of 2

I cannot run the guide in Matlab, even a blank guide.
When I created a blank guide and run it(blank guide),the guide cannot run a prompt appeared like below:
??? Operands to the || and && operators must be convertible to logical scalar values.

Error in ==> gui_mainfcn at 78
    if (numargin>1 && ishghandle(varargin{2}))

Error in ==> openfig at 42
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});

Error in ==> gui_mainfcn>local_openfig at 286
    gui_hFigure = openfig(name, singleton, visible);

Error in ==> gui_mainfcn at 159
        gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt,
        gui_Visible);

Error in ==> openfig at 42
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});

Error in ==> gui_mainfcn>local_openfig at 286
    gui_hFigure = openfig(name, singleton, visible);

Error in ==> gui_mainfcn at 159
        gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt,
        gui_Visible);

Error in ==> fractal1 at 42
    gui_mainfcn(gui_State, varargin{:});


Could anybody help me? I don't understand what happend with the Matlab software....I use Matlab 2010b on window vista
thks a lot

Subject: Cannot run the matlab GUIDE

From: Steven_Lord

Date: 24 Sep, 2010 13:51:14

Message: 2 of 2



"vo quang ha" <voquangha2003@yahoo.com> wrote in message
news:i7hi5r$bkd$1@fred.mathworks.com...
> I cannot run the guide in Matlab, even a blank guide.
> When I created a blank guide and run it(blank guide),the guide cannot run
> a prompt appeared like below:
> ??? Operands to the || and && operators must be convertible to logical
> scalar values.
>
> Error in ==> gui_mainfcn at 78
> if (numargin>1 && ishghandle(varargin{2}))
>
> Error in ==> openfig at 42
> [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});

I just opened openfig.m from release R2010b and line 42 of that function
does NOT match what you've posted here. I suspect that you've created your
own openfig.m function and that it is shadowing the version of that function
that shipped with MATLAB. If so, remove or rename your openfig.m function.
To confirm this, use the command:

which -all openfig

You should see one instance, that being the openfig.m in the
toolbox/matlab/graphics subdirectory underneath the root MATLAB directory
for your installation. Any others in that list should be renamed or
removed.

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us