From: Vikas Malik on
Hii

Can anybody help me how I can update the Data in the uicontrol table in GUI ?

Using a button I get the data from an .xls file and I want to populate this data in the uicontrol table, when every time I select a new file.

I tried using callbacks but I am not able to work out this problem.
From: Vikas Malik on
"Vikas Malik" <vikasmalik22(a)gmail.com> wrote in message <hslqmg$c0j$1(a)fred.mathworks.com>...
> Hii
>
> I am trying to update the data in Uitable in one of my GUI application using Callback.
>
> Right now in my GUI application I have a Button...
> using which I load a data in my GUI application. And I want to update this previous data
> present in GUI Table (uitable) using some callback for example CellEditCallback or KeyPressFucn Callback. But I am not able to do so.
>
> Please tell me how can I update the entire table data.

I don't know why this works
set(handles.uitable1,'Data',magic(10));

but this doesn't work
set(handles.uitable1,'Data',sensor);

where sensor has the same matrix format of rows and columns as that of uicontrol table.
From: Vikas Malik on
"Vikas Malik" <vikasmalik22(a)gmail.com> wrote in message <hslqmg$c0j$1(a)fred.mathworks.com>...
> Hii
>
> I am trying to update the data in Uitable in one of my GUI application using Callback.
>
> Right now in my GUI application I have a Button...
> using which I load a data in my GUI application. And I want to update this previous data
> present in GUI Table (uitable) using some callback for example CellEditCallback or KeyPressFucn Callback. But I am not able to do so.
>
> Please tell me how can I update the entire table data.

I don't know why this works
set(handles.uitable1,'Data',magic(10));

and this doesn't
set(handles.uitable1,'Data',sensor);

and I get this error when I run --> Undefined function or variable 'sensor'.
but I have already defined sensor and assigned it values
From: Vikas Malik on
"Vikas Malik" <vikasmalik22(a)gmail.com> wrote in message <hslt2b$ihr$1(a)fred.mathworks.com>...
> Hii
>
> Can anybody help me how I can update the Data in the uicontrol table in GUI ?
>
> Using a button I get the data from an .xls file and I want to populate this data in the uicontrol table, when every time I select a new file.
>
> I tried using callbacks but I am not able to work out this problem.

I don't know why this works
set(handles.uitable1,'Data',magic(10));

and this doesn't
set(handles.uitable1,'Data',sensor);

and I get this error when I run --> Undefined function or variable 'sensor'.
but I have already defined sensor and assigned it values
From: Yair Altman on
"Vikas Malik" <vikasmalik22(a)gmail.com> wrote in message

> and this doesn't
> set(handles.uitable1,'Data',sensor);
>
> and I get this error when I run --> Undefined function or variable 'sensor'.
> but I have already defined sensor and assigned it values

You probably assigned sensor in a different function and so when you existed that function your sensor values were lost. Try setting handles.uitable1 in the same function as the sensor data.

Yair Altman
http://UndocumentedMatlab.com