In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to achieve GUI programming development in matlab. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
GUI programming development
1. Handle figure
It is an object-oriented drawing system. These details are generally hidden inside the graphics M file, and users can customize many characteristics of the graphics through the handle graphics, which can not be realized by using advanced drawing functions. Handle graphics can be used to create a graphical user interface.
two。 Graphic handle
When matlab creates each drawing object, it assigns a unique value to that object, which is called a drawing object handle. Handles are unique identifiers of drawing objects, and handles of different objects cannot be duplicated and confused.
The computer screen is automatically created by the system as the root object (root) with a handle value of 0, while the handle value of the graphics window object is a positive integer and is displayed in the title bar of the window. Handles to other drawing objects are floating-point numbers.
When creating a variety of objects, matlab will generate a handle to the object, through which various controls and settings can be realized. Matlab provides several functions for getting handles to existing graphic objects.
3. Properties of drawing object
The properties of drawing objects are special values that can be controlled and set. Each attribute has a property name and a property value. The property name is usually a string of uppercase and lowercase letters, with the first letter uppercase.
When you can create drawing objects again, you can set attribute values. If the user does not set the property value, all properties are automatically initialized to the default value of the system.
There are many attributes of the graphic object. Usually, after creating the graphic object, the attribute value is modified through the handle, the attribute value of the graphic object is obtained by the function get (), and the attribute value of the graphic object is set by the function set ().
4. Basic operation of drawing object
Function
Description
Gcf
Gets the handle to the current graphics window
Gca
Gets a handle to the axis in the current graphics window
Gco
Gets the handle to the current object in the current graphics window
Gcbf
Gets the handle to the window of the object corresponding to the callback program being executed
Gcbo
Gets the object handle of the callback program being executed
5. Core graphic correspondence
In matlab, the image () function is used to break into the graphics formation object. The low-level call format of this function is: h=image ('name',value). The main properties of the image object are CData and Visible. The CData property holds the image data of the image, and the Visible property sets whether the image is displayed.
Clear all
Close all
T=0:pi/20:2*pi
Figure ('menubar','none')
H2=plot (tline sin (t))
Set (gca,'xlim', [0 2*pi])
H3=uimenu ('Label',' Color Settings')
Uimenu (h3 recording labelists' red', 'Accelerator','R','callback','set' (H2 recordings' colorcolors''))
Uimenu (h3meme labelists' green', 'Accelerator','G','callback','set' (h _ 2 recorder 'colorcolors''))
Uimenu (h3gramme labelists' blue', 'Accelerator','B','callback','set' (h2recordings' colorcolors''))
Set (gcf,'position', [300 0500300])
This is the end of this article on "how to achieve GUI programming development in matlab". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.