Nehmen Sie Platz!
In den Diskussionen lernen Sie Ihre Kollegen kennen, bewältigen gemeinsam größere Herausforderungen und haben dabei Spaß.
- Möchten Sie die neuesten Updates sehen? Folgen Sie den Highlights!
- Suchen Sie nach Techniken zur Verbesserung Ihrer MATLAB- oder Simulink -Kenntnisse? Tips & Tricks helfen Ihnen weiter!
- Den perfekten Mathe-Witz, Wortspiel oder Meme teilen? Da sind Sie richtig bei Fun!
- Glauben Sie, wir brauchen einen weiteren Kanal? Erzählen Sie uns mehr in Ideas
Aktualisierte Diskussionen
@William Rose, Your dedication to helping others and sharing your knowledge is a big win for the community. Thanks for taking the time to contribute so thoughtfully - your impact is definitely being noticed.👏
Keep it up!
The attached code is an animated solution of the three body problem. On 2024b it runs perfectly fine. When we tried it on 2025a, the animation constantly hitches, the CPU usage is almost double and the runtime is much slower. The curves also look less detailed and jagged in some places. When we run it without drawing anything, the performance seems comparable between versions, but still slightly slower. All of this behavior persists across different hardware. Anybody else having this kind of problem with the new release? I'm suspecting the graphics backend changes may be the culprit here...
clc
clear
close
syms t x1(t) y1(t) x2(t) y2(t) x3(t) y3(t)
G = 6.6743 * 10^-11;
%epsilon = 1e-4
m1 = 10^12;
m2 = 1*10^12;
m3 = 1*10^12;
r1 = [x1(t),y1(t)];
K1 = 1/2 * m1 * (diff(x1(t),t)^2 + diff(y1(t),t)^2);
r2 = [x2(t),y2(t)];
K2 = 1/2 * m2 * (diff(x2(t),t)^2 + diff(y2(t),t)^2);
r3 = [x3(t),y3(t)];
K3 = 1/2 * m3 * (diff(x3(t),t)^2 + diff(y3(t),t)^2);
L1x = diff(diff(K1,diff(x1(t),t)) , t);
L1y = diff(diff(K1,diff(y1(t),t)) , t);
L2x = diff(diff(K2,diff(x2(t),t)) , t);
L2y = diff(diff(K2,diff(y2(t),t)) , t);
L3x = diff(diff(K3,diff(x3(t),t)) , t);
L3y = diff(diff(K3,diff(y3(t),t)) , t);
r12 = r2 - r1;
r13 = r3 - r1;
r23 = r3 - r2;
dlugosc_r12 = sqrt(r12(1)^2 + r12(2)^2);
dlugosc_r13 = sqrt(r13(1)^2 + r13(2)^2);
dlugosc_r23 = sqrt(r23(1)^2 + r23(2)^2);
Q12 = G * m1 * m2 / dlugosc_r12^2 * (r2-r1)/dlugosc_r12;
Q13 = G * m1 * m3 / dlugosc_r13^2 * (r3-r1)/dlugosc_r13;
Q23 = G * m2 * m3 / dlugosc_r23^2 * (r3-r2)/dlugosc_r23;
Q21 = -Q12;
Q32 = -Q23;
Q31 = -Q13;
Q1 = Q12 + Q13;
Q2 = Q21 + Q23;
Q3 = Q31 + Q32;
eqn_1_x = L1x == Q1(1);
eqn_1_y = L1y == Q1(2);
eqn_2_x = L2x == Q2(1);
eqn_2_y = L2y == Q2(2);
eqn_3_x = L3x == Q3(1);
eqn_3_y = L3y == Q3(2);
syms X1 Y1 X2 Y2 X3 Y3
Q1_num = subs(Q1,[x1(t), y1(t), x2(t), y2(t), x3(t), y3(t)],[X1, Y1, X2, Y2, X3, Y3]);
Q2_num = subs(Q2,[x1(t), y1(t), x2(t), y2(t), x3(t), y3(t)],[X1, Y1, X2, Y2, X3, Y3]);
Q3_num = subs(Q3,[x1(t), y1(t), x2(t), y2(t), x3(t), y3(t)],[X1, Y1, X2, Y2, X3, Y3]);
syms vx1 vy1 vx2 vy2 vx3 vy3
state_dot = [
vx1;
vy1;
vx2;
vy2;
vx3;
vy3;
Q1_num(1)/m1;
Q1_num(2)/m1;
Q2_num(1)/m2;
Q2_num(2)/m2;
Q3_num(1)/m3;
Q3_num(2)/m3
];
f = matlabFunction(state_dot, 'Vars', {sym('t'), [X1; Y1; X2; Y2; X3; Y3; vx1; vy1; vx2; vy2; vx3; vy3]});
u0 = [-1e5; %x1
0; %y1
1e5; %x2
0; %y2
0; %x3
sqrt(3)*1e5; %y3
-11/2 * 1e-3; %vx1
11/2*sqrt(3)*1e-3; %vy1
-11/2 * 1e-3; %vx2
-11/2*sqrt(3)*1e-3; %vy2
11e-3; %vx3
0]; %vy3
tspan = [0, 1e9];
%options = odeset('RelTol', 1e-15, 'AbsTol', 1e-20);
[t_sol, u_sol] = ode45(f, tspan, u0);
t_anim = linspace(t_sol(1), t_sol(end), 5000);
u_anim = interp1(t_sol, u_sol, t_anim);
%%
% figure;
tor_1 = plot(u_anim(:,1), u_anim(:,2), 'r', 'LineWidth',1.5); hold on;
tor_2 = plot(u_anim(:,3), u_anim(:,4), 'g', 'LineWidth',1.5);
tor_3 = plot(u_anim(:,5), u_anim(:,6), 'b', 'LineWidth',1.5);
% xlabel('x [m]');
% ylabel('y [m]');
% legend('Ciało 1', 'Ciało 2', 'Ciało 3');
% title('Trajektorie ciał w układzie trzech ciał');
% axis equal
% grid on;
pozycja_1 = plot(u_anim(1,1),u_anim(1,2),'ro','markersize',10,'markerface','r'); hold on
pozycja_2 = plot(u_anim(1,3),u_anim(1,4),'go','markersize',10,'markerface','g');
pozycja_3 = plot(u_anim(1,5),u_anim(1,6),'bo','markersize',10,'markerface','b');
% xlim([-2e5,2e5])
% ylim([-2e5,2e5])
axis equal
for i = 1 : 1 : length(t_sol)
set(pozycja_1,'XData', u_anim(i,1),'YData', u_anim(i,2));
set(pozycja_2,'XData', u_anim(i,3),'YData', u_anim(i,4));
set(pozycja_3,'XData', u_anim(i,5),'YData', u_anim(i,6));
set(tor_1,'XData', u_anim(1:i,1),'YData', u_anim(1:i,2));
set(tor_2,'XData', u_anim(1:i,3),'YData', u_anim(1:i,4));
set(tor_3,'XData', u_anim(1:i,5),'YData', u_anim(1:i,6));
drawnow;
% pause(0.001);
end
Hello! The MathWorks Book Program is thrilled to welcome you to our discussion channel dedicated to books on MATLAB and Simulink. Here, you can:
- Promote Your Books: Are you an author of a book on MATLAB or Simulink? Feel free to share your work with our community. We’re eager to learn about your insights and contributions to the field.
- Request Recommendations: Looking for a book on a specific topic? Whether you're diving into advanced simulations or just starting with MATLAB, our community is here to help you find the perfect read.
- Ask Questions: Curious about the MathWorks Book Program, or need guidance on finding resources? Post your questions and let our knowledgeable community assist you.
We’re excited to see the discussions and exchanges that will unfold here. Whether you're an expert or beginner, there's a place for you in our community. Let's embark on this journey together!
This website is not very attractive or easy to navigate. It is difficult to even find this section - if you start at the Mathworks website, there is no community tab:

You have to go to Help Center, which takes you to documentation, and then click on Community (redirecting you from https://www.mathworks.com/help to https://www.mathworks.com/matlabcentral)

Once you get there it's still a mess

If I have a question, it's not clear whether I should go to MATLAB Answers, Discussions, or Communities. It's not clear what the People page is for, or why it's split off from Community Advisors and Virtual Badges. "Cody" isn't very self-explanatory, and people will only stumble on it by accident, this seems like it should be integrated with contests. Don't get me started on the mess of a Blogs page. My browser knows that I speak English, so why am I being served Japanese language blogs?
I know that web design isn't the main priority of Mathworks, but the website has a very early-2010's look that increasingly feels dated. I hope there will be more consideration given to web UI/UX in the future.
It is April 3, 2025 now. Where is the MATLAB 2025a?
This topic is for discussing highlights to the current R2025a Pre-release.
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle interference velocimetry (a technique for fluid flow measurement) set a new record for all-time File Exchange downloads, surpassing one hundred thousand, dating back to 2010. It also recently eclipsed the 1000 downloads/month mark on File Exchange.
Congratulations to @William Thielicke and his team for this fantastic long term achievement and head over to the File Exchange to download and use it: PIVlab - particle image velocimetry (PIV) tool with GUI - File Exchange - MATLAB Central

Why is RoBERTa not available as a pretrained model? It is superior to BERT in many fields and has become more popular in the literature. For faster inference, you should offer DistilBERT, which is more modern than BERT but smaller/faster. The respository hasn't been updated in two years, which is a lifetime in the field of deep learning.
https://github.com/matlab-deep-learning/transformer-models
Provide insightful answers
9%
Provide label-AI answer
9%
Provide answer by both AI and human
21%
Do not use AI for answers
46%
Give a button "chat with copilot"
10%
use AI to draft better qustions
5%
1561 Stimmen
Large Languge model with MATLAB, a free add-on that lets you access LLMs from OpenAI, Azure, amd Ollama (to use local models) on MATLAB, has been updated to support OpenAI GPT-4.1, GPT-4.1 mini, and GPT-4.1 nano.
According to OpenAI, "These models outperform GPT‑4o and GPT‑4o mini across the board, with major gains in coding and instruction following. They also have larger context windows—supporting up to 1 million tokens of context—and are able to better use that context with improved long-context comprehension."
What would you build with the latest update?

I like this problem by James and have solved it in several ways. A solution by Natalie impressed me and introduced me to a new function conv2. However, it occured to me that the numerous test for the problem only cover cases of square matrices. My original solutions, and Natalie's, did niot work on rectangular matrices. I have now produced a solution which works on rectangular matrices. Thanks for this thought provoking problem James.
I love it all
45%
Love the first snowfall only
15%
Hate it
17.5%
It doesn't snow where I live
22.5%
40 Stimmen
I rarely/never save .fig files
47%
Continue working on it later
16%
Archive for future reference
23%
Share within my organization
10%
Share outside my organization
2%
Other (please leave a comment)
2%
2097 Stimmen
I wanted to turn a Markdown nested list of text labels:
- A
- B
- C
- D
- G
- H
- E
- F
- Q
into a directed graph, like this:

Here is my blog post with some related tips for doing this, including text I/O, text processing with patterns, and directed graph operations and visualization.
The topic recently came up in a MATLAB Central Answers forum thread, where community members discussed how to programmatically control when the end user can close a custom app. Imagine you need to prevent app closure during a critical process but want to allow the end user to close the app afterwards. This article will guide you through the steps to add this behavior to your app.
A demo is attached containing an app with a state button that, when enabled, disables the ability to close the app.
Steps
1. Add a property that stores the state of the closure as a scalar logical value. In this example, I named the property closeEnabled. The default value in this example is true, meaning that closing is enabled. -- How to add a property to an app in app designer
properties (Access = private)
closeEnabled = true % Flag that controls ability to close app
end
2. Add a CloseRequest function to the app figure. This function is called any time there is an attempt to close the app. Within the CloseRequest function, add a condition that deletes the app when closure is enabled. -- How to add a CloseRequest function to an app figure in app designer
function UIFigureCloseRequest(app, event)
if app.closeEnabled
delete(app)
end
3. Toggle the value of the closeEnabled property as needed in your code. Imagine you have a "Process" button that initiates a process where it is crucial for the app to remain open. Set the closeEnabled flag to false (closure is disabled) at the beginning of the button's callback function and then set it to true at the end (closure is enabled).
function ProcessButtonPress(app, event)
app.closeEnabled = false;
% MY PROCESS CODE
app.closeEnabled = true;
end
Handling Errors: There is one trap to keep in mind in the example above. What if something in the callback function breaks before the app.closeEnabled is returned to true? That leaves the app in a bad state where closure is blocked. A pro move would be to use a cleanupObj to manage returning the property to true. In the example below, the task to return the closeEnabled property to true is managed by the cleanup object, which will execute that command when execution is terminated in the ProcessButtonPress function—whether execution was terminated by error or by gracefully exiting the function.
function ProcessButtonPress(app, event)
app.closeEnabled = false;
cleanupClosure = onCleanup(@()set(app,'closeEnabled',true));
% MY CODE
end
Force Closure: If the CloseRequest function is preventing an app from closing, here are a couple of ways to force a closure.
- If you have the app's handle, use delete(app) or close(app,'force'). This will also work on the app's figure handle.
- If you do not have the app's handle, you can use close('all','force') to close all figures or use findall(groot,'type','figure') to find the app's figure handle.
Hi,
We are looking for users of Simulink who also work with the Vehicle Network toolbox to attend a usability session. This wil be a 2 hour session and will offer $100 compensation.
If you are interested, please answer the questions below and send them to: usabilityrecruiting@mathworks.com
In the past 2 years, how often have you worked with ARXML (AUTOSAR XML) files in vehicle network communication?
a. At least 3-5 days per week
b. Once or twice a week
c. A few times a month
d. Once a month or less
e. Never
-
3. Have you worked with automotive ethernet in the past?
a. Yes
b. No
-
4. Which of the following best describe your experience with Simulink? (select all that apply)
Study Screener Q4
a. I have used CAN/ CAN FD blocks (https://www.mathworks.com/help/vnt/can-simulink-communication.html)
b. I have used Simulink Buses
c. I have used Simulink Data Dictionaries
d. Other
-
Thank you!
Elaine
Let's say MathWorks decides to create a MATLAB X release, which takes a big one-time breaking change that abandons back-compatibility and creates a more modern MATLAB language, ditching the unfortunate stuff that's around for historical reasons. What would you like to see in it?
I'm thinking stuff like syntax and semantics tweaks, changes to function behavior and interfaces in the standard library and Toolboxes, and so on.
(The "X" is for major version 10, like in "OS X". Matlab is still on version 9.x even though we use "R20xxa" release names now.)
What should you post where?
Next Gen threads (#1): features that would break compatibility with previous versions, but would be nice to have
@anyone posting a new thread when the last one gets too large (about 50 answers seems a reasonable limit per thread), please update this list in all last threads. (if you don't have editing privileges, just post a comment asking someone to do the edit)
If you are interested in this session, just send an email with the answers to the following questions to usabilityrecruiting@mathworks.com
1. Which of the following best describes your experience with Design of Experiment (DOE)?
a. I regularly use DOE in my work and am comfortable designing experiments and analyzing results
b. I have used DOE in a few projects and understand its principles and applications
c. I have a basic understanding of DOE concepts but have limited practical experience
d. I have never used DOE but I’m interested in learning
-
2. Briefly describe one of your recent projects where you used/want to use DOE. What are the objectives and outcomes?
-
Thank you!
I recently started learning MATLAB and Simulink, and I’m exploring the MathWorks website for study materials. Are there any free tutorials, examples, or beginner guides available directly from their official site? Also, are there special sections for students or personal users to access learning content without needing a full license?
Info zu 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!
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!
Weitere Community-Bereiche
MATLAB Answers
Sie können Fragen zu MATLAB und Simulink stellen und beantworten.
Dateiaustausch
Laden Sie von Benutzern bereitgestellten Code herunter oder tragen Sie selbst solchen Code bei
Cody
Lösen Sie Problemgruppen, lernen Sie MATLAB kennen und erwerben Sie Abzeichen
Blogs
Erhalten Sie Insider-Wissen zu MATLAB und Simulink
KI-Chat-Spielplatz
Verwenden Sie KI, um den ersten MATLAB-Codeentwurf zu generieren und Fragen zu beantworten!