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:
uitable and warning message

Subject: uitable and warning message

From: pink

Date: 17 Jun, 2011 16:50:18

Message: 1 of 4


hi all Can you help me, I make a warning message
my code
data=get(handles.uitable1,'Data')
if isempty(data)
    warndlg ('warning')
    return
else
end

if uitable1 unallocated numbers then there is an error

??? Undefined function or method 'eq' for input arguments of type 'cell'.

Subject: uitable and warning message

From: Anthony

Date: 17 Jun, 2011 18:05:20

Message: 2 of 4

"pink" wrote in message <itg0ka$k0l$1@newscl01ah.mathworks.com>...
>
> hi all Can you help me, I make a warning message
> my code
> data=get(handles.uitable1,'Data')
> if isempty(data)
> warndlg ('warning')
> return
> else
> end
>
> if uitable1 unallocated numbers then there is an error
>
> ??? Undefined function or method 'eq' for input arguments of type 'cell'.

get(handles.uitable1,'Data') returns a cell array. You need to check to see if a particular cell is empty, for example
if isempty(data{1,1})

Subject: uitable and warning message

From: pink

Date: 18 Jun, 2011 06:42:04

Message: 3 of 4

"Anthony" wrote in message <itg510$492$1@newscl01ah.mathworks.com>...
> "pink" wrote in message <itg0ka$k0l$1@newscl01ah.mathworks.com>...
> >
> > hi all Can you help me, I make a warning message
> > my code
> > data=get(handles.uitable1,'Data')
> > if isempty(data)
> > warndlg ('warning')
> > return
> > else
> > end
> >
> > if uitable1 unallocated numbers then there is an error
> >
> > ??? Undefined function or method 'eq' for input arguments of type 'cell'.
>
> get(handles.uitable1,'Data') returns a cell array. You need to check to see if a particular cell is empty, for example
> if isempty(data{1,1})

but if uitable1 has a value in case of error

Subject: uitable and warning message

From: Anthony

Date: 20 Jun, 2011 10:15:21

Message: 4 of 4

"pink" wrote in message <itg0ka$k0l$1@newscl01ah.mathworks.com>...
>
> hi all Can you help me, I make a warning message
> my code
> data=get(handles.uitable1,'Data')
> if isempty(data)
> warndlg ('warning')
> return
> else
> end
>
> if uitable1 unallocated numbers then there is an error
>
> ??? Undefined function or method 'eq' for input arguments of type 'cell'.
If I'm reading this right, you have a cell array of error messages and you want to see if there are any messages in it. Your going to have to iterate through the cell array and check to see if each individual cell is empty.

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