MATLAB >> Matlab GUI uitable help

by Fei » Fri, 02 Jan 2009 02:52:59 GMT

I am trying to create table in Matlab GUI in GUIDE. The default uitable comes with four rows and two columns. I delete a row in the Table Property Editor but when I click Apply the deleted rows come back. How can I permanently delete rows? Or is this a bug?

MATLAB >> Matlab GUI uitable help

by Image Analyst » Fri, 02 Jan 2009 11:37:01 GMT



----------------------------------------------------------------------------------------------------------
Fei:
My rows stay deleted. But I used the "Data" property in the Property Inspector. I clicked on the little yellow square with crosshairs icon and then typed in a number of rows (such as 1). Then I didn't see any Apply button like you did - I saw an "OK" button. When I clicked the OK button, it looked exactly how I expected. I'm not sure what you were doing, but try this way. I'm using version R2008b. What version are you using? Have you tried calling tech support or another user to see if someone else can replicate it? I can't replicate it but then I'm not sure I'm doing it exactly the same way you are, and I'm not sure if I'm using the same version.
Good luck,
ImageAnalyst

MATLAB >> Matlab GUI uitable help

by Travis » Wed, 01 Jul 2009 06:40:19 GMT


I am having the same problem Fei is/did. I don't see 'the little yellow square with crosshairs icon' I see, and I am guessing she does too, an icon identical to the create table icon form guide. Though after guide had been open for a while those icons, and functionality, did change to what you are talking about.

MATLAB >> Matlab GUI uitable help

by Zhang » Wed, 30 Jun 2010 09:31:24 GMT

> I am having the same problem Fei is/did. I don't see 'the little yellow square with crosshairs icon' I see, and I am guessing she does too, an icon identical to the create table icon form guide. Though after guide had been open for a while those icons, and functionality, did change to what you are talking about.


I just solved this problem. First you define a matrix or cell in workspace with the dimension same as the table you want to creat. for instance, you want creat a 2 by 2 table, you define a 2 by 2 cell, a = {1,2;3;4}. Then creat a uitable, and then go to "Data" property in the Property Inspector, select "Change data value to the selected workspace variable below", then select the data you just created. Then you can go to row, and delete the extra row you don't want, and apply, you will get a 2 by 2 table.

Similar Threads

1. Compiling a GUI in Matlab: Problem with uitable - MATLAB

2. Adding row with data to existing uitable in GUI

Hi -

I've been struggling for quite some time with a uitable without any luck, so i'm going to ask all you clever people instead. I'm currently trying to add a row of data to an uitable every time a button is pressed. BUT, unlike all the other examples available on the internet, I'm interested in adding a row containing a column for each of the variables 'direction_angle', 'tilt_angle' and 'date_time', where the data is written in. The uitable look like this:

Column headers : [     ][ Date and Time ][ Direction Angle ][ Tilt angle ]
Add new row:      [  1 ][    'date_time'   ][ direction_angle ][ tilt_angle ]

(The first column is the obligatory row-number)

% The data is created in the following way:

X = rand(1,1);
Y = rand(1,1);

[THETA,RHO] = cart2pol(X,Y);

direction_angle = rad2deg(THETA);
tilt_angle = rad2deg(RHO);
date_time = datestr(now);

% The example i've found where an empty row is added

data = get(handles.data_table,'Data');
newRowdata = newRowdata = cat(1,data,cell(1,size(data,2)));
set(handles.data_table,'Data',newRowdata)

% How do I write my data into the table when adding a new row?

A sincere thanks to anybody who can help me...!

Kind regards

Jens Olesen, Denmark

3. uitable GUI - MATLAB

4. MATLAB Gui Help, Piano Keys on Gui?

I'm fairly new and I wanted to create a Matlab gui. I typed in "guide" to get started on my gui but it doesn't seem to resolve my issue. 

I want to put a piano keyboard on the gui and when each piano key is played, the keys change color. The user doesn't need to actually press the keys on the piano. The piano keyboard layout is just there for them to show which piano keys are activated and deactivated (as the keys will change color).

If anyone could show me where to start looking (Links) or tell me how I could even start by getting a piano image on the gui that can do what I want....please guide me. 

Thanks very much.

5. uitable help - MATLAB

6. help regarding uitable row row height adjust

Hi all
can any one tell me how to adjust the Title Row Height(width) in
uitable. I have a title of length 30characters. It is not good in look
if I change the column width so long. Is there any way to adjust the
width of the tile row?
Also the integer values populated in column cells are Right aligned by
default. Is there any way to change it to align CENTER? I tried many
options, but they are not working.
- thanks

7. problem using uitable component with Matlab Compiler Runtime - MATLAB

8. uitable in Matlab 2008b

Hello,
I'm working with a uitable object (Matlab 2008b).
I would like to know how to reference each cell (with column and row, I guess...).
Is there a way to Enable/Disable a full row depending on the value of a logical cell (true/false)???

Thank you all!
Nadia.