ur video on adding a table to GUI and using the data

i wish to use the data which is being displayed as the output. i can only see the data changing on screen, but if i want access of that data, can u tell me in which variable is it stored or how do i assign the data values to a variable which can be used in the workspace

1 Kommentar

Is this question addressed to a particular person?
If you are referring to a Mathworks tutorial video, it might help to provide the link to the specific one you are interested in.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 29 Apr. 2011
If you have a uitable() with handle H, then to get the data from the table, you would use
TheData = get(H,'Data');
The output of this, TheData, would be a cell array containing the individual entries for the array. For example, TheData{3,5} would be the entry for the third row, fifth column.

2 Kommentare

sumeet
sumeet am 29 Apr. 2011
http://blogs.mathworks.com/videos/
i guess u have gt the video correct
my handle is hObject...i tried ur command using my handle instead of 'H' bt it returns Undefined variable "TheData" or class "TheData".
pls guide
get(hObject, 'Data') and assign the result to whatever variable you want. Then that variable will be a cell array containing the table.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by