App Building Components in MATLAB
MATLAB provides an easy-to-implement solution for your ideas. You can represent your ideas in a GUI-friendly way using the MATLAB App Builder. Matlab app builder is very simple to use, which consisted of two parts, i.e., designing and coding part.
The best part of Matlab App Builder is its ready-to-use components, which could be taken to use by just dragging and dropping them. It saves a lot of effort for writing codes for them. You can also customize the properties in the Component Browser which are located at the rightmost side of the screen.
You can use any of the components available for app building by dragging it from the Component Library(located in the leftmost part, which consists of all the components). The component library looks something like this:
The Component Library is divided into further subtopics. You can find your preferred component under its subtopic. Let’s have a brief look over these subtopics:
- Common: The most common components could be found here. You would be using these components most of the time. Some of the common components include Axes, Button, Edit Fields, etc.
- Containers: When you want to make your app more structured or require more space. These components are mainly used for arranging the data to utilize the empty space in the app, It’s components are Grid Layout, Panel, and Tab Group.
- Figure Tools: Sometimes you need to store some menus in a specific figure, then these components could be used. These components include the Context menu, Menu Bar, and Toolbar.
- Instrumentation: Instruments are commonly used by engineers for calculating pressures, gauges, etc. It includes 90 Degree Gauge, Gauge, Lamp, etc.
- Aerospace: Calculations made for aerospace engineering is mostly used while solving the equations for aerospace engineering. These components provide a very accurate reading so that many accidents could be prevented. Aerospace components include Airspeed Indicator, Altimeter, Artificial Horizons, etc.
Let’s understand all of these components in detail, with their uses as well as visualizing them.
Before discussing the properties, let’s have a brief on what these components look like on importing them. In the fig. below, we have imported Axes, Button, CheckBox, DatePicker, Drop Down, Label, Edit Field(numeric), Edit Field(text), Hyperlink, Image, and List Box. Let’s discuss them before moving forward.
- Axes: Plotting graphs on Matlab is one of the very common operations which is frequently used. If you wish to plot graphs similarly on your App then, you need to import Axes.
- Button: To trigger any action, you need to import a button. Button click basically used to call a function, to trigger some action.
- Check Box: There are multiple instances when you make a multiple-choice, or customize something as per your wish. For handling such cases checkbox is used.
- Date Picker: A date Picker is used to pick some dates from a virtual calendar. You can customize this calendar as your own.
- Drop Down:- Drop Down helps you select an option from a list.
- Label: Label is used for addressing something. It provides a caption to your app components or some general instruction to your users.
- Edit Field(Numeric): When you want to take numeric input from the user, then you can use Edit Field(Numeric). Here numeric specifies that only numeric form of data could be entered in the field.
- Edit Field(Text): When the input type is a string, or then Edit Field(Text) is used for taking inputs.
- Hyperlink: Hyperlink enables you to navigate to any specified URL or different tab of the app by clicking over it.
- Image: Image is used for inserting images in the app. You can customize its size easily, for using it as a logo, or any product design.
- List Box: List Box is like Drop Down, the only difference is that you can select one option from Drop Down, whereas multiple in List Box.
In the fig. below, we have imported Radio Button, Slider, Toggle Button, Text Area, State Button, Spinner, Table, Tree, and Tree Check box.
- Radio Button: Radio Button is used for selecting a particular radio option from a list of radio buttons.
- Slider: Slider is used for taking inputs from a specified range.
- Toggle Button: Toggle button is used for selecting single options from a group of Toggle Buttons.
- Text Area: Text area is used to take input of long text.
- Spinner: Help you take input when the range is low that is differ by place value within the very low margin.
- Table: Table helps you make a table in your app.
- Tree: Tree provides you with help by summarizing them under the main topic.
- Tree Check Box: The tree Check Box is similar to the tree but enables you to choose your desired selection from the tree.
- Grid Layout: It helps you remain organized. Grid layout provides you the freedom to make an app more structured in a friendly manner.
- Panel: Panels are the outline that separates different parts of the app. You can divide a single interface into more than one part using this.
- Tab Group: Sometimes you need to have more than one page of your app or some part of the app then, you can use the tab group, which separates the app into different parts.
It consists of Menu Bar, Tool Bar, and Context Menu.
- Menubar: Menubar is used to insert a Menubar in your app. You can use one menu bar per app/tab only.
- Toolbar: The toolbar is like a menubar, but instead of a menu, icons are used in it.
- Context Menu: Context Menu is used to link the app with the context menu. You can add context menus using it.
These are the instruments mainly used in engineering and mechanical calculations. It consists of 90 Degree Gauge, Discrete Knob, Gauge, Knob, Lamp, Linear Gauge, Rocker Switch, Semicircular Gauge, Switch, and Toggle Switch.
Aerospace engineering requires a lot of calculations, where every small piece of data matters a lot. So for handling them we have got a lot of Aerospace components in built-in MATLAB. These components include Airspeed Indicator, Altimeter, Artificial Horizon, ClimbIndicator, EGT Indicator, Heading Indicator, RPM Indicator, and Turn Coordinator.
When you use any component, then its code automatically gets written in the codes. You can further specify them for different tasks using callbacks, and then call the components via them. You find them in the component browser.
Please Login to comment...