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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:18:28+00:00 2026-05-19T03:18:28+00:00

I am not matlab programmer but I need to create an interface using matlab!

  • 0

I am not matlab programmer but I need to create an interface using matlab!
This qusetion should be very easy for matlab programmers 🙂

I have an interface which contains radio button group panel “OperationPanel”
,4 radioButtons inside it which names are “addBtn, subBtn, divBtn, mulBtn” and I have command button, I want when I click over the button to get the value of the selected radioButton

What is the commad I should use ? I google it and found that if I make

get(handles.NewValue,'Tag');

I tired it but it doesn’t work!! Can I hava some help!

  • 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-19T03:18:28+00:00Added an answer on May 19, 2026 at 3:18 am

    Here’s a quick example to illustrate how to get the value of a radio-button group component:

    function simpleGUI
        hFig = figure('Visible','off', 'Menu','none', 'Name','Calculator', 'Resize','off', 'Position',[100 100 350 200]);
        movegui(hFig,'center')          %# Move the GUI to the center of the screen
    
        hBtnGrp = uibuttongroup('Position',[0 0 0.3 1], 'Units','Normalized');
        uicontrol('Style','Radio', 'Parent',hBtnGrp, 'HandleVisibility','off', 'Position',[15 150 70 30], 'String','Add', 'Tag','+')
        uicontrol('Style','Radio', 'Parent',hBtnGrp, 'HandleVisibility','off', 'Position',[15 120 70 30], 'String','Subtract', 'Tag','-')
        uicontrol('Style','Radio', 'Parent',hBtnGrp, 'HandleVisibility','off', 'Position',[15  90 70 30], 'String','Multiply', 'Tag','*')
        uicontrol('Style','Radio', 'Parent',hBtnGrp, 'HandleVisibility','off', 'Position',[15  60 70 30], 'String','Divide', 'Tag','/')
    
        uicontrol('Style','pushbutton', 'String','Compute', 'Position',[200 50 60 25], 'Callback',{@button_callback})
    
        hEdit1 = uicontrol('Style','edit', 'Position',[150 150 60 20], 'String','10');
        hEdit2 = uicontrol('Style','edit', 'Position',[250 150 60 20], 'String','20');
        hEdit3 = uicontrol('Style','edit', 'Position',[200  80 60 20], 'String','');
    
        set(hFig, 'Visible','on')        %# Make the GUI visible
    
        %# callback function
        function button_callback(src,ev)
            v1 = str2double(get(hEdit1, 'String'));
            v2 = str2double(get(hEdit2, 'String'));
            switch get(get(hBtnGrp,'SelectedObject'),'Tag')
                case '+',  res = v1 + v2;
                case '-',  res = v1 - v2;
                case '*',  res = v1 * v2;
                case '/',  res = v1 / v2;
                otherwise, res = '';
            end
            set(hEdit3, 'String',res)
        end
    end
    

    screenshot

    Obviously you could add more validations on the input numbers and so on…

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

Sidebar

Related Questions

Not very technical, but... I have to implement a bad words filter in a
I have discovered through trial and error that the MATLAB engine function is not
Not sure how to ask a followup on SO, but this is in reference
First, let me say I'm not a professional programmer, but an engineer who had
I can reference Matlab code from a x86 based project, but not from an
Not sure if this is possible or if I'm expressing correctly what I'm looking
(Not related to versioning the database schema) Applications that interfaces with databases often have
Not that I'm doing something like that, but I am kind of interested how
Not too practical maybe, but still interesting. Having some abstract question on matrix multiplication
Not sure what exactly is going on here, but seems like in .NET 1.1

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.