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 6620047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:02:58+00:00 2026-05-25T21:02:58+00:00

I used simpletab.m from MatlabCentral to make simple tabs in GUI Matlab, now I

  • 0

I used simpletab.m from MatlabCentral to make simple tabs in GUI Matlab, now I wanted to add another function so that the result of the added function is displayed when I press the GUI tab buttons.

For example I want to add a function to every tab, when I press “tab 1” that function output (in this case a graph) is displayed.

Update 1

THANKS FOR YOUR PROMPT REPLY.
It worked good, but what if I don’t want to the “Tab 1 function” to appear when I press the Tab button..straight away I want my graphs to be properly listed when I press tab 1 button.

Update 2

I have written the modified function that you told me but still I get the tab name ‘Tab 1 function’ when I press the tab 1 button.

Moreover I want two sub tabs to appear straight under the tab 1 button when I press the tab 1 button..one sub tab will display data on one graph for all sensors and one tab will display data on individual graphs.

Do I have to write two separate functions and two separate subcall functions for each sub tab?

I hope you have understood what I am trying to say. I’m really running out of time..:(..feeling lost

  • 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-25T21:02:59+00:00Added an answer on May 25, 2026 at 9:02 pm

    Simply add your function to the appropriate callback (see end of file):

    % --- Executes on button press in tab1button.
    function tab1button_Callback(hObject, eventdata, handles)
    
    figure();
    plot(1:10);
    
    
    % --- Executes on button press in tab2button.
    function tab2button_Callback(hObject, eventdata, handles)
    
    disp('Button from Tab 2 was pressed')
    figure();
    plot(11:20);
    
    
    % --- Executes on button press in tab3button.
    function tab3button_Callback(hObject, eventdata, handles)
    
    figure();
    plot(11:20);
    

    Now, if you press tab2, you’ll see the message ‘Button from Tab 2 was pressed’ AND a new figure will open with a line going from 11:20.
    All you have to do now is to customize your plotting in the according callback function.

    EDIT: I’ve modified ‘tab1button_Callback’ so that only the plotting function will be executed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used to use this function to redirect from one php page to another:
Used http://www.ilbcfreeware.org/software.html - I only get static from the files that ilbc_test.exe creates. Does
Never used a cache like this before. The problem is that I want to
I used jQuery to set hover callbacks for elements on my page. I'm now
We used to use SourceSafe, and one thing I liked about it was that
I used the following code to display the event details fetched from the database.
I used SWIG for generating some native JNI function interface for Irrlicht C/C++ 3D
I used vs2010 to create a project that uses framework 2.0. I can't use
I used var dp:ArrayCollection = new ArrayCollection(container.GetVotesResult); to get the JSON data from GetVotesResult
I used to have a code that checks any previous element with a corresponding

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.