An mlx dashboard in MATLAB changes static data analysis into an interactive experience. You can visualize and control your models with up-to-the-minute precision. The Live Editor allows you to create dashboards that display and analyze data in real time, such as weather information collected from sensor stations. These interactive interfaces connect controls to variables and block parameters. They provide an accessible way to tune values during simulation. You might build a dashboard for climate control systems. Or you could create a live dashboard for complex model analysis. The mlx dashboard capabilities offer powerful visualization tools. This piece walks you through everything from setting up your first dashboard live environment to deploying advanced interactive displays for your team.
What is an MLX Dashboard and Why Use It
Understanding MLX files in MATLAB
MATLAB live scripts stored as MLX files combine code, formatted text, equations and images in a single interactive environment called the Live Editor. The file format uses open standards, specifically an Open Packaging Conventions file (as with Simulink’s .slx format), which is a ZIP file you can open with any tool. The “document.xml” file sits inside the ZIP and contains your MATLAB code and rich text following the ECMA-376 (OOXML) standard, while “output.xml” stores a serialized version of the output. Images appear as separate parts within the package.
The content organizes into cells that contain either text or MATLAB code. Text cells support formatted text, images, hyperlinks, headings, paragraphs and bulleted lists, while code cells contain executable MATLAB code with output displayed below, including tables, plots and other visualizations. MATLAB introduced a plain text Live Code file format (.m) as an alternative to the binary .mlx format in R2025a and offers improved transparency and better integration with source control tools.
Key benefits of interactive dashboards
Interactive dashboards allow you to participate with data through filters, drill-down capabilities and various highlighting techniques. This interactivity saves time and lets users explore data and find answers on their own, which reduces additional report requests. Cross-filtering connects multiple visualizations that respond to user interactions in up-to-the-minute fashion and makes it simple to construct engaging interfaces.
Dependent filters establish relationships between selection criteria and let you adjust queries based on previous selections. Drilling options maintain simplicity on the main dashboard while linking to more details when necessary.
Up-to-the-minute dashboard capabilities
You can create dashboards to display and analyze up-to-the-minute data using buttons to retrieve and display information on request. Other interactive controls modify the displayed data, and hiding the code shows only formatted text, controls and results to dashboard users.
Common use cases for data visualization
Live scripts store and display output with the code that creates it. You can add formatted text, images, hyperlinks and equations to produce an interactive narrative to share with others. The Live Editor retrieves and displays data based on user-provided inputs and makes it ideal to monitor performance, track metrics and support analytical insights.
Setting Up Your First MLX Dashboard
Creating a new live script file
Go to the Home tab and click New Live Script to get started with your mlx dashboard. A blank file opens in the Live Editor where you can build your immediate dashboard. You can also use the edit function in the Command Window by typing edit WeatherDashboard.mlx to create or open a specific file. The .mlx extension identifies the file as a live script rather than a standard MATLAB code file, so specify it when you create new files.
The binary Live Code file format stores your code, formatted content and output using Open Packaging Conventions technology when you save your work. R2025a and later versions let you choose a plain text Live Code format (.m) that opens in external code editors and works better with source control systems.
Adding dashboard blocks to your workspace
Live scripts support interactive controls including sliders, spinners, drop-down lists, check boxes, edit fields, buttons, file browsers, color pickers and date pickers to control variable values. Insert these controls into your live script to create user input mechanisms. Add a button at the beginning of your script and configure it to update data when pressed, to name just one example. Replace variables with check boxes to toggle options, such as switching between measurement units.
Connecting data sources to your dashboard
Connect your live dashboard to databases using ODBC or JDBC drivers through the Database Explorer app or command line functions. You can pull information from sources like ThingSpeak channel 12397 for weather data if you need immediate data streams. Configure each data connection before running your dashboard to ensure smooth data retrieval.
Configuring simple display options
Right-click controls and select Configure Control to specify their behavior. Set button labels and execution options to Current section, making the code in that section run when users interact with the control. Go to the View tab and click Hide Code to view your dashboard without code clutter, displaying only controls and results.
Building Interactive Controls and Displays
Adding buttons and sliders for user input
Insert interactive controls from the Live Editor tab by clicking Control and selecting from available options. Button controls run code upon click. This allows you to update displayed weather data or trigger calculations. Configure each button by right-clicking, selecting Configure Control, and setting the label plus execution options. Set the Run option to “Current section” so only that portion executes when users press the button.
Sliders provide numeric input through a movable thumb that users drag to desired values. Specify Min and Max values in the Values section, or select workspace variables from the drop-down list. The value displayed to the left shows the slider’s current position. To name just one example, you might use sliders to adjust panel size from 0 to 40 or efficiency from 0 to 100.
Implementing gages and graphs
The Gage block displays connected signals on a circular scale during simulation. You can modify the range to fit your data and color-code in-specification and out-of-specification ranges. Connect display blocks to signals by entering connect mode, selecting the signal line, and clicking Done Connecting. Dashboard blocks skip traditional ports and rely instead on connect mode, the Simulink Toolstrip, or the Connection table in Block Parameters.
Dashboard Scope blocks trace signals during simulation and show variations over time. Multiple display blocks can connect to a single signal and capture different information types.
Creating up-to-the-minute data updates
Data linking keeps plots synchronized with workspace variables using linkdata on. Linked plots update automatically when you change variable values. Alternatively, set XDataSource and YDataSource properties of plotted objects to variable names, then call refreshdata and drawnow in loops to update visualizations based on modified data.
Hiding code to show dashboard view only
View your mlx dashboard without code by clicking Hide Code in the View tab. This displays only formatted text, labeled controls, tasks, and output. Labels appear next to each control when code is hidden. Right-click any control and select Configure Control to modify labels in the Label section.
Advanced Dashboard Features and Customization
Working with multiple data streams
Managing multiple data sources requires well-laid-out parameter storage. You can save relevant parameters in MAT files with the save function and load them through callbacks in Model Properties. The Modeling tab has a callbacks section where you add load commands to InitFcn so parameters load before model updates happen. This approach prevents errors when models share parameter names since InitFcn executes each time before updates occur. You can use CloseFcn to save updated parameter values back to MAT files after modifications.
Customizing visual appearance
You can customize dashboard blocks by selecting the block and clicking Edit Custom Block from the ellipsis menu while in design mode. The Property Inspector’s Design tab provides access to scale limits, value bar colors, background images and needle configurations. You can upload custom images or delete default backgrounds to match your system’s appearance. Font customization has options for display type, size, color and style.
Adding tabs and panels
You can create tabbed panels by selecting dashboard blocks and clicking Promote to Panel from the action bar. The Panels section of the Simulink Toolstrip has an Add Tab button. You can reorder tabs by dragging their names to new positions. Tabs can be detached by dragging away from the panel or attached by dragging over another panel’s name until a plus symbol appears.
Deploying your dashboard for others to use
You can deploy panels as standalone desktop apps or web apps with Simulink Compiler and MATLAB Compiler. Select your panel, go to the Panels tab, expand Deploy Panel and choose Standalone Desktop App or Web App. Desktop apps need MATLAB Runtime while web apps need MATLAB Web App Server access.
Conclusion
MLX dashboards transform your data analysis workflow from static code to interactive experiences. The combination of immediate controls and custom visualizations makes these dashboards valuable for any MATLAB project. You can start with a simple live script and add interactive controls. Build complexity as your needs grow gradually. After you become skilled at the basics, you can deploy professional dashboards that your entire team can use without writing code.


