Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the column names of a uitable in MATLAB?

I am working with MATLAB GUI. I have a push button, when I press it, it is going to be like this:

uitable result

To show that table, I wrote this script:

t=uitable;
set(t,'Data',y)

y is the variable to show the numbers in the table.

The problem is, I want to change the column names. For example, the first column is going to be named X, the second column is Y, the third column is Z, the fourth column is T. What script should I add to change the name of the column?

like image 295
Alvi Syahrin Avatar asked Nov 04 '25 02:11

Alvi Syahrin


1 Answers

You can change the column names using set

set(t, 'columnname', {'X', 'Y', 'Z', 'T'});
like image 69
H.Muster Avatar answered Nov 05 '25 21:11

H.Muster



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!