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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:24:44+00:00 2026-06-13T13:24:44+00:00

I am working on pattern recognition project and currently in GUI creation phase. I

  • 0

I am working on pattern recognition project and currently in GUI creation phase. I would like to have a pushbutton that is able to perform the following command once the pushbutton is clicked:

a = imread(image_name);
b = rgb2gray(a);
glcm = graycomatrix(b);
glcm (:); 

May I know what function should I use to program the pushbutton? Your help is greatly appreciated.

Thank you.

  • 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-06-13T13:24:45+00:00Added an answer on June 13, 2026 at 1:24 pm

    Seems to me like you don’t know how to make callback functions. Here’s how to do it if you’re building your GUI programmatically:

    % create the button
    but = uicontrol(...
        'style', 'pushbutton', ...
        'string', 'my awesome button',...
        'callback', @buttonCallback);  % <--- SET CALLBACK HERE
    
    function buttonCallback(~,~)  % <--- what's called back when pressing the button
        a = imread(image_name);
        b = rgb2gray(a);
        glcm = graycomatrix(b);
        glcm (:); 
    end
    

    How to do it via GUIDE is similar, and outlined in detail here.

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

Sidebar

Related Questions

Working with the MVVM pattern, I have a pair of view model classes that
I am working on project that uses this pattern var businessEntity = new DAL().GetObject(id);
I'm working with a pattern that looks like so (pseudo example): var FOO =
I'm working on my first true WPF MVVM pattern application. Currently I have a
I'm working on an enterprise application that leverages the repository pattern on top of
I'm building a WPF application and working with the MVVM pattern. I have 4
I am working on mvc project, with repository pattern and entity framework, now on
When I was working with XmlDOM in Asp.Net, there was a pattern like this
I'm working on the MVC Pattern Winforms example project from this website Program.cs static
I'm working with GWT 2.4 and MVP pattern, so I have Presenters and Views

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.