Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6092919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:30:02+00:00 2026-05-23T12:30:02+00:00

I have created a GUI in Matlab and this is how it looks: I

  • 0

I have created a GUI in Matlab and this is how it looks:

enter image description here

I need to know if I can change the row and column names of the table during runtime and not some static name.

Is there any way to do this or alternatively how can I do this in other way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:30:02+00:00Added an answer on May 23, 2026 at 12:30 pm

    If your GUI is not built using GUIDE you can set / modify the uitable properties like this (directly from http://www.mathworks.com/help/techdoc/ref/uitable.html):

    f = figure('Position',[200 200 400 150]);
    dat = rand(3); 
    cnames = {'X-Data','Y-Data','Z-Data'};
    rnames = {'First','Second','Third'};
    t = uitable('Parent',f,'Data',dat,'ColumnName',cnames,... 
                'RowName',rnames,'Position',[20 20 360 100]);
    

    Then you could modify the column names during execution by using:

    cnames = {'Z-Data','Y-Data','X-Data'};
    set(t,'ColumnName',cnames);
    

    The only thing remaining is deciding which event will trigger this modification and writing the appropriate callback function. If you could give some details about the GUI it could be useful.

    If you are building your GUI via GUIDE, I do not know if it is possible (I guess so but I generally prefer to avoid GUIDE so my knowledge is limited in this area).

    UPDATE:

    As an example, I wrote a small piece of code that shows this in action. In this case the event triggering the columns names change is a button but it could be anything, hope this helps.

    % GUI
    function so_uitable
    % Layout
    figure('units','normalized','position',[0.1 0.1 0.5 0.5],'tag','figure');
    data=guihandles(gcf);
    uitable('parent',data.figure,'units','normalized', ... 
        'Position', [0.1 0.1 0.35 0.8],'tag','table');
    uicontrol('style','pushbutton','string','Change columns names', ... 
        'parent',data.figure,'units','normalized', ... 
        'Position',[0.55 0.8 0.35 0.1],'tag','button', ... 
        'callback',@button_callback);
    data=guihandles(gcf); 
    % Data
    data.matrix=rand(3);
    data.cnames={'X-Data','Y-Data','Z-Data'};
    set(data.table,'data',data.matrix,'ColumnName',data.cnames);
    guidata(gcf,data);
    end
    % Callback
    function button_callback(obj,event)%#ok
    data=guidata(gcbf);
    n=length(data.cnames);
    prompt=cell(n,1);
    answer=inputdlg(prompt,'Change columns names',1,data.cnames);
    if(~isempty(answer))
        data.cnames=answer;
        set(data.table,'ColumnName',data.cnames);
    end
    guidata(gcbf,data);
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a GUI that will setup the pivot table. For example, I
I have created my GUI using wxGlade and it looks fine in the display.
I have created a gui, this gui uses a jtabbed pane. I have an
I have created a program in c++ that doesn't have any GUI. When this
I have created a MATLAB GUI using GUIDE. I have a slider with a
I have created a Windows Forms GUI in C# that can display tabular data
I have an assignment to create a GUI using MATLAB GUIDE and am having
I have created a GUI for starting a Thread which does something very simple.
I have created a very simple GUI project in Qt as follows: main: #include
I am going to make a GUI that will have dynamically created sets of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.