Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11For a new MATLAB GUI, App Designer is the best default: use it to lay out controls, create callbacks, and connect the interface to your existing MATLAB functions. Refactor scripts into functions with explicit inputs and outputs before wiring them to buttons. To share the result, choose a MATLAB app package for MATLAB users, MATLAB Compiler for a standalone desktop application, or the Compiler and Web App Server workflow for browser access.
What a MATLAB GUI is—and which approach to use
A MATLAB app is an interactive program: its graphical user interface accepts input, invokes MATLAB logic, and presents results. The GUI is the interface; the app includes that interface and the code behind it. A component is an individual control, such as a numeric field, button, table, axes, or status lamp. A callback is code that runs in response to an event, such as a button press or a changed value. Component properties—such as Value, Text, Items, and Enable—hold settings or current values.
MathWorks recommends App Designer for building new apps. Choose a different route only when its specific trade-offs fit your project. See MathWorks’ overview of ways to build MATLAB GUIs.
| Need | Practical choice |
|---|---|
| New app with visual layout design, or a first GUI | App Designer |
Interface generated dynamically, kept in ordinary .m files, or built from reusable UI factories |
Programmatic UI construction with uifigure and UI components |
| Existing GUIDE or older GUI code | Maintain it as needed, then consider migration; MathWorks provides a GUIDE-to-App Designer Migration Tool |
| Share an app with people who have MATLAB | Package the app for MATLAB users |
| Desktop app for people without MATLAB | Build a standalone application with MATLAB Compiler |
| Browser-based MATLAB app | App Designer, MATLAB Compiler/Web App Compiler, and MATLAB Web App Server |
| Small interface for a live script | Consider Live Editor tasks or controls |
App Designer creates .mlapp files and combines visual layout tools with MATLAB callback programming. Programmatic construction is useful when the interface is code-generated or source-controlled as ordinary MATLAB files, but you take responsibility for layout, resizing, component wiring, and app state. App Designer is MathWorks’ recommended environment, not a requirement for every project. Learn more on the App Designer product page.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Prepare existing MATLAB code before adding the interface
Keep the calculation separate from the controls. A callback should translate user input into function arguments, handle errors, and display results—not contain the entire algorithm. This makes the calculation easier to test and reuse, and avoids dependence on whichever variables happen to be in MATLAB’s base workspace.
Turn a script into a function
A script like this has a hard-coded filename and leaves its results in the workspace:
filename = "data.csv";
data = readmatrix(filename);
meanValue = mean(data, "omitnan");
plot(data);
title("Data");
Refactor the file-processing calculation so it accepts a filename and returns results:
function [data, meanValue] = analyzeFile(filename)
data = readmatrix(filename);
meanValue = mean(data, "omitnan");
end
Test the function independently before connecting it to a GUI. Replace interactive input() calls with arguments, and avoid relying on assignin or evalin unless legacy constraints make them necessary. Remove broad commands such as clear, clc, and close all from code launched by a callback: they can disturb a user’s workspace or close unrelated figures. Make file paths and other dependencies explicit.
Keep the interface layer thin
A useful flow is: read component values, validate and convert them, call an ordinary MATLAB function, then update a label, table, or axes. If multiple callbacks need the same loaded data or settings, store that state in app properties instead of global variables or the base workspace.
Build a working app in App Designer
- Open the designer. Run
appdesignerin MATLAB, or use the MATLAB Apps tab and choose Design App. The command and function are documented at MathWorks’ App Designer reference. - Create and save a blank app. Start from a blank app or a suitable template; save it with a meaningful name such as
TemperatureConverter.mlapp. - Add controls. For a numerical tool, add numeric edit fields for input, a button to run the calculation, a label or text area for status, and UIAxes if you need a plot. Use a drop-down or radio buttons when users select among options.
- Name the components. Use descriptive names such as
AmplitudeEditField,PlotButton,StatusLabel, andUIAxes. Clear names make callback code easier to read than defaults such asNumericEditField2. - Create the button callback in the designer. Select the button and add a button-pushed callback through the Callbacks section in the Component Browser or Property Inspector. Let App Designer generate its callback signature; generated signatures can vary by release and component. A typical callback is shown below.
- Read, validate, and use control values. Numeric edit fields expose their value through a property such as
app.AmplitudeEditField.Value. A text edit field returns text; convert it withstr2doubleand reject invalid results before calling numerical code. - Run the app and try both valid and invalid input. Check that output appears in the intended component and that invalid values produce a clear, recoverable message.
App Designer’s integrated editor and callback workflow are described in Develop Apps Using App Designer.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Complete example: generate and plot a sine wave
Save the calculation as makeSineWave.m in a location MATLAB can find:
function [x, y] = makeSineWave(amplitude, frequency)
x = linspace(0, 1, 1000);
y = amplitude .* sin(2*pi*frequency.*x);
end
In App Designer, add numeric edit fields named AmplitudeEditField and FrequencyEditField, a button named PlotButton, a label named StatusLabel, and axes named UIAxes. In the generated button-pushed callback, use:
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minute% Button pushed function: PlotButton
function PlotButtonPushed(app, event)
amplitude = app.AmplitudeEditField.Value;
frequency = app.FrequencyEditField.Value;
if ~isfinite(amplitude) || ~isfinite(frequency)
uialert(app.UIFigure, ...
"Amplitude and frequency must be finite numbers.", ...
"Invalid input");
return
end
if frequency <= 0
uialert(app.UIFigure, ...
"Frequency must be greater than zero.", ...
"Invalid input");
return
end
[x, y] = makeSineWave(amplitude, frequency);
plot(app.UIAxes, x, y, "LineWidth", 1.5);
grid(app.UIAxes, "on");
xlabel(app.UIAxes, "Time");
ylabel(app.UIAxes, "Amplitude");
title(app.UIAxes, "Generated sine wave");
app.StatusLabel.Text = "Plot generated successfully.";
end
The callback reads values from the app’s components, rejects invalid input, calls the separately testable function, plots into the app’s axes, and reports success. uialert tells the user how to recover instead of leaving an unhandled error as the only feedback.
Always target the intended axes
In an app, use plot(app.UIAxes, x, y), not plot(x, y). The latter relies on MATLAB’s current axes, which might be a different figure or axes if other windows are open. App Designer supports plots and other visualization components; see the App Designer overview.
Convert a file-processing script into a GUI workflow
Use a file dialog to replace a hard-coded input path. The callback below selects a CSV or text file, handles cancellation, calls the refactored function, plots results, and reports failures:
function LoadAndAnalyzeButtonPushed(app, event)
[file, folder] = uigetfile( ...
{"*.csv;*.txt", "Data files"; "*.*", "All files"}, ...
"Select a data file");
if isequal(file, 0)
app.StatusLabel.Text = "File selection cancelled.";
return
end
filename = fullfile(folder, file);
if ~isfile(filename)
uialert(app.UIFigure, ...
"The selected file no longer exists.", ...
"File not found");
return
end
try
[data, meanValue] = analyzeFile(filename);
plot(app.UIAxes, data);
grid(app.UIAxes, "on");
app.MeanValueLabel.Text = sprintf("Mean: %.6g", meanValue);
app.StatusLabel.Text = "Analysis complete.";
catch exception
uialert(app.UIFigure, exception.message, "Analysis failed");
end
end
uigetfile returns 0 for the filename when the user cancels, so handle that outcome before using the path. For save workflows, use uiputfile and handle cancellation similarly. For tabular data, functions such as readtable and components such as uitable may be more suitable than plotting raw values. Validate file contents as well as file existence: a selected file can still have an unexpected format, missing columns, or unreadable data.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Validate inputs before running calculations
- Numeric field: Check constraints such as
isfinite(value), and enforce required ranges before using the value. - Text field representing a number: Convert with
str2doubleand rejectNaNor non-finite values as appropriate. - File: Check existence and catch errors from reading or processing it; a valid path does not guarantee valid contents or permissions.
- Options: Use controls with defined choices, such as a drop-down, rather than accepting ambiguous free-form text when the algorithm expects a fixed set.
Set limits and clear units on controls where possible. Show useful guidance to end users rather than raw stack traces. During development, retain enough diagnostic information to investigate failures.
Build the same kind of GUI entirely in MATLAB code
If you need a generated interface or prefer ordinary .m source, create a uifigure and add components programmatically. This compact example uses a nested callback, which can access the controls created in the containing function:
function sineGui
fig = uifigure( ...
"Name", "Sine Wave Generator", ...
"Position", [100 100 640 420]);
amplitudeField = uieditfield(fig, "numeric", ...
"Position", [120 350 100 22], ...
"Value", 1);
frequencyField = uieditfield(fig, "numeric", ...
"Position", [120 310 100 22], ...
"Value", 2);
uilabel(fig, "Text", "Amplitude", ...
"Position", [30 350 80 22]);
uilabel(fig, "Text", "Frequency", ...
"Position", [30 310 80 22]);
ax = uiaxes(fig, "Position", [260 60 350 320]);
uibutton(fig, "push", ...
"Text", "Plot", ...
"Position", [90 250 100 28], ...
"ButtonPushedFcn", @plotButtonPushed);
function plotButtonPushed(~, ~)
amplitude = amplitudeField.Value;
frequency = frequencyField.Value;
if ~isfinite(amplitude) || ~isfinite(frequency) || frequency <= 0
uialert(fig, ...
"Enter a finite amplitude and a positive frequency.", ...
"Invalid input");
return
end
x = linspace(0, 1, 1000);
y = amplitude .* sin(2*pi*frequency.*x);
plot(ax, x, y, "LineWidth", 1.5);
grid(ax, "on");
end
end
Run sineGui from MATLAB to open the window. Code-first construction gives direct control over how components are created, but the developer must also manage layout and resizing rather than arranging controls visually. The MathWorks MATLAB GUI overview describes this approach.
Use the right figure and component family
Modern UI components and App Designer-style interfaces use uifigure. Older graphics and GUI code may use figure and traditional controls. They do not behave identically in every respect, so code written for a traditional figure should not be expected to transfer unchanged. Common adaptations include replacing generic plotting with a target axes handle, moving shared state into app properties, updating callback wiring, and checking whether used functionality is supported in the intended deployment target.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Organize state and keep the interface responsive
Store shared app data in properties
For a small app, a component’s current value may be all the state you need. For a larger app, define private properties for data shared across callbacks:
properties (Access = private)
Data double
SelectedFile string
IsBusy logical = false
end
After loading a file, for example, assign app.Data = data and app.SelectedFile = string(filename). Properties are also useful for computed results, shared settings, handles to secondary windows, and busy or cancellation state. Add helper methods when multiple callbacks need the same operation. The App Designer documentation covers organizing app data, helper functions, and performance.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Prevent long calculations from looking like a broken app
A long synchronous callback can stop the interface from responding until it finishes. Depending on the algorithm and MATLAB release, consider dividing work into stages, updating progress, disabling the Run button to prevent duplicate jobs, and offering cancellation where practical. Background execution can help for supported work, but not every MATLAB function, file operation, toolbox call, or graphics update is suitable for it. Check the requirements of the specific work you plan to run asynchronously, and keep UI updates within the appropriate UI/event mechanism.
Manage multiple windows deliberately
If an app opens a secondary window, keep its handle in an app property and check whether the window still exists before creating another instance. This prevents duplicate windows and gives callbacks a reliable way to update or close the existing one.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Choose how to share or deploy the app
A .mlapp file is not itself a standalone executable. Pick the distribution path according to what the recipient has and how they need to run the tool. MathWorks describes separate options in Ways to Share Apps.
| Distribution goal | Route | What the recipient needs |
|---|---|---|
| Install an app in MATLAB | Package it from App Designer, commonly as an app installer such as .mlappinstall |
MATLAB, plus any required products or toolboxes |
| Distribute a MATLAB toolbox-style package | Package as a .mltbx where appropriate |
MATLAB and compatible requirements for the package |
| Run a standalone desktop application | Build with MATLAB Compiler | MATLAB Runtime and the deployment requirements for the application; not a full MATLAB installation |
| Use a MATLAB app in a browser | Build a web app from App Designer with the Compiler/Web App Compiler workflow and host it using MATLAB Web App Server | Access to the configured server and browser; server-side hosting and product requirements apply |
These formats are not interchangeable: an .mlapp is the App Designer app file, an app installer is for MATLAB app installation, and a toolbox package has its own packaging purpose. A compiled desktop app is a deployment product rather than a MATLAB app installer.
Package for MATLAB users
- Open the app in App Designer and go to the Designer tab.
- Select Share → MATLAB App.
- Review the app metadata and required files, then select Package.
- Install and test the resulting package from MATLAB’s Apps tab on a clean MATLAB setup that reflects your recipients’ requirements.
The App Designer packaging workflow is documented in Package Apps in App Designer. Dependency analysis can include many helper files, images, custom UI components, and data files, but do not assume it finds every resource. Check files referenced by HTML UI components, external language interfaces, and function handles stored in MAT-files. Review the generated release folder and deploymentLog.html if files appear to be missing. Before distributing, check required toolboxes, hard-coded absolute paths, file-name case, supported MATLAB releases and platforms, and access to any data the app expects.
Build a standalone desktop application
To reach users without MATLAB, build a standalone application using MATLAB Compiler. In App Designer, choose Share → Standalone Desktop App, or use Application Compiler. Add the main app and required files, then build the installer or deployable application. The developer needs MATLAB Compiler and the applicable licensing; recipients generally need MATLAB Runtime to run the deployed application, not a full MATLAB installation. Runtime and installation requirements still apply. Toolbox functionality, unsupported features, native libraries, MEX-files, external dependencies, file permissions, and platform-specific behavior can affect whether the application works on the target machine. See the MathWorks app-sharing guide.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Publish a browser-based MATLAB app
The documented MATLAB web-app workflow starts with an App Designer app, packages it with MATLAB Compiler/Web App Compiler, and hosts it with MATLAB Web App Server; it is not a general way to publish any arbitrary MATLAB script as a web app. Open Web App Compiler from the Apps gallery or run webAppCompiler. A command-line build can use compiler.build.webAppArchive, but the exact function signature and configuration depend on the MATLAB release. Follow the applicable release’s Create and Deploy a Web App documentation rather than assuming one command works unchanged in every release.
Some MATLAB functionality is unsupported in deployed web apps. Production hosting, authentication, roles, administration, and serving multiple releases may require MATLAB Web App Server rather than only the development server included with Compiler. See the app-sharing guide and the MATLAB Compiler Web Apps documentation for deployment details.
Troubleshoot common MATLAB GUI problems
A callback cannot find a helper function
Check that the function file is in the current folder or on the MATLAB path, that its filename matches the function name, and that a different same-named function is not taking precedence. Run which functionName -all. For a packaged or deployed app, verify that the helper was included and that its toolbox or other dependencies are available.
A plot appears outside the app
Pass the target axes explicitly, for example plot(app.UIAxes, x, y). Calls that rely on the current axes can target another figure when multiple windows exist.
Recommended Free Tools
The app works in MATLAB but fails after packaging
Check for omitted data or helper files, absolute paths that do not exist on the target computer, unsupported functions, missing toolboxes, MEX-files or native libraries, external Python, Java, .NET, or C++ dependencies, environment variables, write permissions, and platform-specific code. Read the packaging or deployment log and test the built app on a clean target environment; success on the developer’s machine does not confirm that all external dependencies are present elsewhere.
The interface freezes or users launch duplicate runs
The callback may be doing long-running work synchronously. Provide progress feedback, disable controls that would start duplicate work, and consider supported background execution or a staged algorithm. Confirm that any background work is compatible with the functions and UI operations it uses.
A file dialog was cancelled
Handle isequal(file, 0) immediately after uigetfile and return or show a cancellation status. Do not pass the cancellation value to path-building or file-reading code.
Choose the lightest workflow that meets the real requirement
- Your users have MATLAB: Build in App Designer and package the app for installation.
- Your users need a desktop tool but do not have MATLAB: Assess MATLAB Compiler, Runtime, required products, and target-machine deployment.
- Your users need browser access: Assess the App Designer web-app workflow and the hosting and administration requirements of MATLAB Web App Server.
- You need a code-generated interface or ordinary MATLAB source files: Build programmatically with UI components and account for the additional layout and maintenance work.
- Your project is an existing GUIDE app: Maintain it where necessary and consider MathWorks’ migration tooling if new development or maintainability calls for App Designer.
For a MATLAB-centric engineering tool, App Designer and a thin callback layer are usually a straightforward starting point. If the real requirement is a general-purpose web or desktop product, compare deployment and licensing constraints before committing to a MATLAB-specific distribution path.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

