Hi everyone!
I’m Kishen Mahadevan, Senior Product Manager at MathWorks, where I focus on controls and deep learning. I’m excited to be speaking at MATLAB EXPO this year!
In one of my sessions, I’ll share how AI-based reduced order models (ROMs) are transforming engineering workflows—using battery fast charging as an example—making it easier to reuse high-fidelity models for real-time control and deployment.
I’d love to have you join the conversation at the EXPO and right here in the community!
Feel free to drop any questions or thoughts ahead of the event.
Jorge Bernal-AlvizJorge Bernal-Alviz shared the following code that requires R2025a or later:
Test()
Warning: Hardware-accelerated graphics is unavailable. Displaying fewer markers to preserve interactivity.
function Test()
duration = 10;
numFrames = 800;
frameInterval = duration / numFrames;
w = 400;
t = 0;
i_vals = 1:10000;
x_vals = i_vals;
y_vals = i_vals / 235;
r = linspace(0, 1, 300)';
g = linspace(0, 0.1, 300)';
b = linspace(1, 0, 300)';
r = r * 0.8 + 0.1;
g = g * 0.6 + 0.1;
b = b * 0.9 + 0.1;
customColormap = [r, g, b];
figure('Position', [100, 100, w, w], 'Color', [0, 0, 0]);
axis equal;
axis off;
xlim([0, w]);
ylim([0, w]);
hold on;
colormap default;
colormap(customColormap);
plothandle = scatter([], [], 1, 'filled', 'MarkerFaceAlpha', 0.12);
for i = 1:numFrames
t = t + pi/240;
k = (4 + 3 * sin(y_vals * 2 - t)) .* cos(x_vals / 29);
e = y_vals / 8 - 13;
d = sqrt(k.^2 + e.^2);
c = d - t;
q = 3 * sin(2 * k) + 0.3 ./ (k + 1e-10) + ...
sin(y_vals / 25) .* k .* (9 + 4 * sin(9 * e - 3 * d + 2 * t));
points_x = q + 30 * cos(c) + 200;
points_y = q .* sin(c) + 39 * d - 220;
points_y = w - points_y;
CData = (1 + sin(0.1 * (d - t))) / 3;
CData = max(0, min(1, CData));
set(plothandle, 'XData', points_x, 'YData', points_y, 'CData', CData);
brightness = 0.5 + 0.3 * sin(t * 0.2);
set(plothandle, 'MarkerFaceAlpha', brightness);
drawnow;
pause(frameInterval);
end
end
Hey Relentless Coders! 😎
Let’s get to know each other. Drop a quick intro below and meet your teammates! This is your chance to meet teammates, find coding buddies, and build connections that make the contest more fun and rewarding!
You can share:
  • Your name or nickname
  • Where you’re from
  • Your favorite coding topic or language
  • What you’re most excited about in the contest
Let’s make Team Relentless Coders an awesome community—jump in and say hi! 🚀
Jack and Cleve had famously noted in the "A Preview of PC-MATLAB" in 1985: For those of you that have not experienced MATLAB, we would like to try to show you what everybody is excited about ... The best way to appreciate PC-MATLAB is, of course, to try it yourself.
Try out the end-to-end workflow of developing touchless applications with both MathWorks' tools and STM Dev Cloud from last year!
You can check out the exercises and the manual.
You can also register this year's EXPO. Join the Hands-On workshops to learn the latest features that make the design and deployment workflow even easier!
AI for Engineered Systems
47%
Cloud, Software Factories, & DevOps
0%
Electrification
13%
Autonomous Systems and Robotics
13%
Model-Based Design
7%
Wireless Communications
20%
15 voti
David
David
Ultima attività il 6 Nov 2025 alle 20:47

Parallel Computing Onramp is here! This free, one-hour self-paced course teaches the basics of running MATLAB code in parallel using multiple CPU cores, helping users speed up their code and write code that handles information efficiently.
Remember, Onramps are free for everyone - give the new course a try if you're curious. Let us know what you think of it by replying below.
Get ready to roll up your sleeves at MATLAB EXPO 2025 – our global online event is back, and this year we’re offering 10 hands-on workshops designed to spark innovation and deepen your skills with MATLAB Online and Simulink Online.
Whether you're exploring AI, modeling batteries, or building carbon trackers, these live workshops are your chance to:
  • Work directly in MATLAB and Simulink Online
  • Solve real-world challenges with guidance from MathWorks experts
  • Connect with peers across industries
  • Ask questions and get live feedback
Join the Experience to learn more about each workshop below!
Which workshop are you most excited to attend?!
Day 1:
  • Beyond the Labels: Leveraging AI Techniques for Enlightened Product Choices
  • A Hands-On Introduction to Reinforcement Learning with MATLAB and Simulink
  • Curriculum Development with MATLAB Copilot and Generative AI
  • Simscape Battery Workshop
  • Generating Tests for your MATLAB code
Day 2:
  • Hands-On AI for Smart Appliances: From Sensor Data to Embedded Code
  • A Hands-On Introduction to Reduced Order Modeling with MATLAB and Simulink
  • Introduction to Research Software and Development with Simulink
  • Hack Your Carbon Impact: Build and Publish an Emissions Tracker with MATLAB
  • How to Simulate Scalable Cellular and Connectivity Networks: A Hands-On Session
We look forward to Accelerating the Pace of Engineering and Science together!
From my experience, MATLAB's Deep Learning Toolbox is quite user-friendly, but it still falls short of libraries like PyTorch in many respects. Most users tend to choose PyTorch because of its flexibility, efficiency, and rich support for many mathematical operators. In recent years, the number of dlarray-compatible mathematical functions added to the toolbox has been very limited, which makes it difficult to experiment with many custom networks. For example, svd is currently not supported for dlarray inputs.
This link (List of Functions with dlarray Support - MATLAB & Simulink) lists all functions that support dlarray as of R2026a — only around 200 functions (including toolbox-specific ones). I would like to see support for many more fundamental mathematical functions so that users have greater freedom when building and researching custom models. For context, the core MATLAB mathematics module contains roughly 600 functions, and many application domains build on that foundation.
I hope MathWorks will prioritize and accelerate expanding dlarray support for basic math functions. Doing so would significantly increase the Deep Learning Toolbox's utility and appeal for researchers and practitioners.
Thank you.
Hey Cool Coders! 😎
Let’s get to know each other. Drop a quick intro below and meet your teammates! This is your chance to meet teammates, find coding buddies, and build connections that make the contest more fun and rewarding!
You can share:
  • Your name or nickname
  • Where you’re from
  • Your favorite coding topic or language
  • What you’re most excited about in the contest
Let’s make Team Cool Coders an awesome community—jump in and say hi! 🚀
Registration is now open for MathWorks annual virtual event MATLAB EXPO 2025 on November 12 – 13, 2025!
Register now and start building your customized agenda today!
Explore. Experience. Engage.
Join MATLAB EXPO to connect with MathWorks and industry experts to learn about the latest trends and advancements in engineering and science. You will discover new features and capabilities for MATLAB and Simulink that you can immediately apply to your work.
David
David
Ultima attività il 3 Nov 2025 alle 20:06

Run MATLAB using AI applications by leveraging MCP. This MCP server for MATLAB supports a wide range of coding agents like Claude Code and Visual Studio Code.
Check it out and share your experiences below. Have fun!

Add a subtitle

Multi-lined titles have been supported for a long time but starting in r2020b, you can add a subtitle with its own independent properties to a plot in two easy ways.

  1. Use the new subtitle function: s=subtitle('mySubtitle')
  2. Use the new second argument to the title function: [t,s]=title('myTitle','mySubtitle')
figure()
tiledlayout(2,2)
% Method 1
ax(1) = nexttile;
th(1) = title('Pupil size'); 
sh(1) = subtitle('Happy faces');
ax(2) = nexttile;
th(2) = title('Pupil size'); 
sh(2) = subtitle('Sad faces');
% Method 2
ax(3) = nexttile;
[th(3), sh(3)] = title('Fixation duration', 'Happy faces'); 
ax(4) = nexttile;
[th(4), sh(4)] = title('Fixation duration', 'Sad faces'); 
set(ax, 'xticklabel', [], 'yticklabel', [],'xlim',[0,1],'ylim',[0,1])
% Set all title colors to orange and subtitles colors to purple.
set(th, 'Color', [0.84314, 0.53333, 0.1451])
set(sh, 'Color', [0, 0.27843, 0.56078])

Control title/Label alignment

Title and axis label positions can be changed via their Position, VerticalAlignment and HorizontalAlignment properties but this is usually clumsy and leads to other problems when trying to align the title or labels with an axis edge. For example, when the position units are set to 'data' and the axis limits change, the corresponding axis label will change position relative to the axis edges. If units are normalized and the axis position or size changes, the corresponding label will no longer maintain its relative position to the axis, and that's assuming the normalized position was computed correctly in the first place.

Starting in r2020b, title and axis label alignment can be set to center|left|right, relative to the axis edges.

  • TitleHorizontalAlignment is a property of the axis: h.TitleHorizontalAlignment='left';
  • LabelHorizontalAlignment is a property of the ruler object that defines the x | y | z axis: h.XAxis.LabelHorizontalAlignment='left';
% Create data
x = randi(50,1,100)'; 
y = x.*[.2, -.2] + (rand(numel(x),2)-.5)*10; 
gray = [.65 .65 .65];
% Plot comparison between columns of y
figure()
tiledlayout(2,2,'TileSpacing','none')
ax(1) = nexttile(1);
plot(x, y(:,1), 'o', 'color', gray)
lsline
ylabel('Y1 (units)')
title('Regression','Y1 & Y2 separately')
ax(2) = nexttile(3);
plot(x, y(:,2), 'd', 'color', gray)
lsline
xlabel('X Label (units)')
ylabel('Y2 (units)')
grid(ax, 'on')
linkaxes(ax, 'x')
%  Move title and labels leftward
set(ax, 'TitleHorizontalAlignment', 'left')
set([ax.XAxis], 'LabelHorizontalAlignment', 'left')
set([ax.YAxis], 'LabelHorizontalAlignment', 'left')
% Combine the two comparisons into plot and flip the second 
% y-axis so trend are in the same direction
ax(3) = nexttile([2,1]);
yyaxis('left')
plot(x, y(:,1), 'o')
ylim([-6,16])
lsline
xlabel('X Label (units)')
ylabel('Y1 (units) \rightarrow')
yyaxis('right')
plot(x, y(:,2), 'd')
ylim([-16,6])
lsline
ylabel('\leftarrow Y2 (units)')
title('Direct comparison','(Y2 axis flipped)')
set(ax(3),  'YDir','Reverse')
% Align the ylabels with the minimum axis limit to emphasize the
% directions of each axis. Keep the title and xlabel centered
ax(3).YAxis(1).LabelHorizontalAlignment = 'left';
ax(3).YAxis(2).LabelHorizontalAlignment = 'right';
ax(3).TitleHorizontalAlignment = 'Center';       % not needed; default value.
ax(3).XAxis.LabelHorizontalAlignment = 'Center'; % not needed; default value.
Are there any code restrictions for programming Cody solutions? I could not find anything mentioned at https://www.mathworks.com/matlabcentral/content/cody/about.html, other than toolbox functions not being available.
Here is a screenshot of a Cody problem that I just created. The math rendering is poor. (I have since edited the problem to remove the math formatting.)
We’re excited to invite you to Cody Contest 2025! 🎉
Pick a team, solve Cody problems, and share your best tips and tricks. Whether you’re a beginner or a seasoned MATLAB user, you’ll have fun learning, connecting with others, and competing for amazing prizes.
How to Participate
  • Join a team that matches your coding personality
  • Solve Cody problems, complete the contest problem group, or share Tips & Tricks articles
  • Bonus Round: Two top players from each team will be invited to a fun code-along event
Contest Timeline
  • Main Round: Nov 10 – Dec 7, 2025
  • Bonus Round: Dec 8 – Dec 19, 2025
Register for the Contest
Registration is open now! Join your team, meet other coders, and get ready to learn and have fun!
The all-community-solutions view shows the ID of each solution, and you can click on the link to go to the solution.
The preferred-community-solutions view does not show the solution IDs and does not link to the solutions. As far as I can tell, there is no way to get from that view to the solutions. If, for example, you want to go to the solution to leave a comment there, you can't.
All-community-solutions view:
Preferred-community-solutions view, with no solution IDs and no links:
Steve Eddins
Steve Eddins
Ultima attività il 28 Ott 2025 alle 20:48

I'm seeing solution maps shown with low-contrast gray colors instead of the correct symbol colors. I have observed this using both Safari and Chrome. Screenshot:
Hey Creative Coders! 😎
Let’s get to know each other. Drop a quick intro below and meet your teammates! This is your chance to meet teammates, find coding buddies, and build connections that make the contest more fun and rewarding!
You can share:
  • Your name or nickname
  • Where you’re from
  • Your favorite coding topic or language
  • What you’re most excited about in the contest
Let’s make Team Creative Coders an awesome community—jump in and say hi! 🚀

Informazioni su Discussions

Discussions is a user-focused forum for the conversations that happen outside of any particular product or project.

Get to know your peers while sharing all the tricks you've learned, ideas you've had, or even your latest vacation photos. Discussions is where MATLAB users connect!

Altre aree comunitarie

MATLAB Answers

Poni e rispondi a domande su MATLAB e Simulink

Scambio di file

Scarica o contribuisci al codice inviato da un utente

Cody

Risolvi problemi, impara ad usare MATLAB e ottieni badge

Blog

Scopri MATLAB e Simulink dall’interno

Area giochi di chat AI

Utilizza l'intelligenza artificiale per generare la bozza iniziale del codice MATLAB e rispondere alle domande!