Results for
What a fantastic start to Cody Contest 2025! In just 2 days, over 300 players joined the fun, and we already have our first contest group finishers. A big shoutout to the first finisher from each team:
- Team Creative Coders: @Mehdi Dehghan
- Team Cool Coders: @Pawel
- Team Relentless Coders: @David Hill
- 🏆 First finisher overall: Mehdi Dehghan
Other group finishers: @Bin Jiang (Relentless), @Mazhar (Creative), @Vasilis Bellos (Creative), @Stefan Abendroth (Creative), @Armando Longobardi (Cool), @Cephas (Cool)
Kudos to all group finishers! 🎉
Reminder to finishers: The goal of Cody Contest is learning together. Share hints (not full solutions) to help your teammates complete the problem group. The winning team will be the one with the most group finishers — teamwork matters!
To all players: Don’t be shy about asking for help! When you do, show your work — include your code, error messages, and any details needed for others to reproduce your results.
Keep solving, keep sharing, and most importantly — have fun!
If you have solved a Cody problem before, you have likely seen the Scratch Pad text field below the Solution text field. It provides a quick way to get feedback on your solution before submitting it. Since submitting a solution takes you to a new page, any time a wrong solution is submitted, you have to navigate back to the problem page to try it again.
Instead, I use the Scratch Pad to test my solution repeatedly before submitting. That way, I get to a working solution faster without having to potentially go back and forth many times between the problem page and the wrong-solution page.
Here is my approach:
- Write a tentative solution.
- Copy a test case from the test suite into the Scratch Pad.
- Click the Run Function button—this is immediately below the Scratch Pad and above the Output panel and Submit buttons.
- If the solution does not work, modify the solution code, sometimes putting in disp() lines and/or removing semicolons to trace what the code is doing. Repeat until the solution passes.
- If the solution does work, repeat steps 2 through 4.
- Once there are no more test cases to copy and paste, clean up the code, if necessary (delete disp lines, reinstate all semicolons to suppress output). Click the Run Function button once more, just to make sure I did not break the solution while cleaning it up. Then, click the Submit button.
For problems with large test suites, you may find it useful to copy and paste in multiple test cases per iteration.
Hopefully you find this useful.
Title: Looking for Internship Guidance as a Beginner MATLAB/Simulink Learner
Hello everyone,
I’m a Computer Science undergraduate currently building a strong foundation in MATLAB and Simulink. I’m still at a beginner level, but I’m actively learning every day and can work confidently once I understand the concepts. Right now I’m focusing on MATLAB modeling, physics simulation, and basic control systems so that I can contribute effectively to my current project.
I’m part of an Autonomous Underwater Vehicle (AUV) team preparing for the Singapore AUV Challenge (SAUVC). My role is in physics simulation, controls, and navigation, and MATLAB/Simulink plays a major role in that pipeline. I enjoy physics and mathematics deeply, which makes learning modeling and simulation very exciting for me.
On the coding side, I practice competitive programming regularly—
• Codeforces rating: ~1200
• LeetCode rating: ~1500
So I'm comfortable with logic-building and problem solving. What I’m looking for:
I want to know how a beginner like me can start applying for internships related to MATLAB, Simulink, modeling, simulation, or any engineering team where MATLAB is widely used (including companies outside MathWorks).
I would really appreciate advice from the community on:
- What skills should I strengthen first?
- Which MATLAB/Simulink toolboxes are most important for beginners aiming toward simulation/control roles?
- What small projects or portfolio examples should I build to improve my profile?
- What is the best roadmap to eventually become a good candidate for internships in this area?
Any guidance, resources, or suggestions would be extremely helpful for me.
Thank you in advance to everyone who shares their experience!
The main round of Cody Contest 2025 kicks off today! Whether you’re a beginner or a seasoned solver, now’s your time to shine.
Here’s how to join the fun:
- Pick your team — choose one that matches your coding personality.
- Solve Cody problems — gain points and climb the leaderboard.
- Finish the Contest Problem Group — help your team win and unlock chances for weekly prizes by finishing the Cody Contest 2025 problem group.
- Share Tips & Tricks — post your insights to win a coveted MathWorks Yeti Bottle.
- Bonus Round — 2 players from each team will be invited to a fun live code-along event!
- Watch Party – join the big watch event to see how top players tackle Cody problems
Contest Timeline:
- Main Round: Nov 10 – Dec 7, 2025
- Bonus Round: Dec 8 – Dec 19, 2025
Big prizes await — MathWorks swag, Amazon gift cards, and shiny virtual badges!
We look forward to seeing you in the contest — learn, compete, and have fun!
Jorge Bernal-AlvizJorge Bernal-Alviz shared the following code that requires R2025a or later:
Test()
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
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.
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.
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:

Hi cody fellows,
I already solved more than 500 problems -months ago, last july if I remember well- and get this scholar badge, but then it suddenly disappeared a few weeks later. I then solved a few more problems and it reappeared.
Now I observed it disappeared once more a few days ago.
Have you also noticed this erratic behavior of the scholar badge ? Is it normal and / or intentional ? If not, how to explain it ? (deleted problems ?)
Cheers,
Nicolas
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:

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.)

I am excited to join this community to learn the more particularly the Matlab/Simulink
I just learned you can access MATLAB Online from the following shortcut in your web browser: https://matlab.new
Thanks @Yann Debray
From his recent blog post: pip & uv in MATLAB Online » Artificial Intelligence - MATLAB & Simulink
I'm developing a comprehensive MATLAB programming course and seeking passionate co-trainers to collaborate!
Why MATLAB Matters:Many people underestimate MATLAB's significance in:
- Communication systems
- Signal processing
- Mathematical modeling
- Engineering applications
- Scientific computing
Course Structure:
- Foundation Module: MATLAB basics and fundamentals
- Image Processing: Practical applications and techniques
- Signal Processing: Analysis and implementation
- Machine Learning: ML algorithms using MATLAB
- Hands-on Learning: Projects, assignments.
What I'm Looking For:
- Enthusiastic educators willing to share knowledge
- Experience in any MATLAB application area
- Commitment to collaborative teaching
Interested in joining as a co-trainer? Please comment below or reach out directly!
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.
Online Doc + System Browser
12%
Online Doc + Dedicated Browser
12%
Offline Doc +System Browser
12%
Offline Doc + Dedicated Browser
21%
Hybrid Approach (Support All Modes)
24%
User-Definable / Fully Configurable
21%
34 votes
I'm working on training neural networks without backpropagation / automatic differentiation, using locally derived analytic forms of update rules. Given that this allows a direct formula to be derived for the update rule, it removes alot of the overhead that is otherwise required from automatic differentiation.
However, matlab's functionalities for neural networks are currently solely based around backpropagation and automatic differentiation, such as the dlgradient function and requiring everything to be dlarrays during training.
I have two main requests, specifically for functions that perform a single operation within a single layer of a neural network, such as "dlconv", "fullyconnect", "maxpool", "avgpool", "relu", etc:
- these functions should also allow normal gpuArray data instead of requiring everything to be dlarrays.
- these functions are currently designed to only perform the forward pass. I request that these also be designed to perform the backward pass if user requests. There can be another input user flag that can be "forward" (default) or "backward", and then the function should have all the necessary inputs to perform that operation (e.g. for "avgpool" forward pass it only needs the avgpool input data and the avgpool parameters, but for the "avgpool" backward pass it needs the deriviative w.r.t. the avgpool output data, the avgpool parameters, and the original data dimensions). I know that there is a maxunpool function that achieves this for maxpool, but it has significant issues when trying to use it this way instead of by backpropagation in a dlgradient type layer, see (https://www.mathworks.com/matlabcentral/answers/2179587-making-a-custom-way-to-train-cnns-and-i-am-noticing-that-avgpool-is-significantly-faster-than-maxpo?s_tid=srchtitle).
I don't know how many people would benefit from this feature, and someone could always spend their time creating these functionalities themselves by matlab scripts, cuDNN mex, etc., but regardless it would be nice for matlab to have this allowable for more customizable neural net training.
Inspired by @xingxingcui's post about old MATLAB versions and @유장's post about an old Easter egg, I thought it might be fun to share some MATLAB-Old-Timer Stories™.
Back in the early 90s, MATLAB had been ported to MacOS, but there were some interesting wrinkles. One that kept me earning my money as a computer lab tutor was that MATLAB required file names to follow Windows standards - no spaces or other special characters. But on a Mac, nothing stopped you from naming your script "hello world - 123.m". The problem came when you tried to run it. MATLAB was essentially doing an eval on the script name, assuming the file name would follow Windows (and MATLAB) naming rules.
So now imagine a lab full of students taking a university course. As is common in many universities, the course was given a numeric code. For whatever historical reason, my school at that time was also using numeric codes for the departments. Despite being told the rules for naming scripts, many students would default to something like "26.165 - 1.1" for problem one on HW1 for the intro applied math course 26.165.
No matter what they did in their script, when they ran it, MATLAB would just say "ans = 25.0650".
Nothing brings you more MATLAB-god credibility as a student tutor than walking over to someone's computer, taking one look at their output, saying "rename your file", and walking away like a boss.
I recently published this blog post about resources to help people learn MATLAB https://blogs.mathworks.com/matlab/2025/09/11/learning-matlab-in-2025/
What are your favourite MATLAB learning resources?
