主要内容

搜索

Matt Nickels
Matt Nickels
上次活动时间: 大约 3 小时 前

I can not understand why Plot Browser was taken away in latest Matlab... I use Plot Browser all of the time! Having to find and click the particular line I want in a plot with a lot of lines is way less convenient than just selecting it in the Plot Browser. Also, being able to quickly hide/show multiple lines at once with the plot browser was so helpful in a lot of cases. Please bring Plot Browser back!!!! Please reply with support for this if you feel the same as I do!
When you compare MATLAB Plot Gallery with matplotlib gallery, you can see that matplotlib gallery contains a lot of nice graphs which are easy to create in MATLAB but not listed in MATLAB Plot Gallery.
For example, "Data Distribution Plots" section in the MATLAB Plot Gallery includes example for pie function instead of examples for piechart and donutchart functions, etc.

In the latest Graphics and App Building blog article, documentation writer Jasmine Poppick modernized a figure-based bridge analysis app by replacing uicontrol with new UI components and uifigure, resulting in cleaner code, better layouts, and expanded functionality in R2025a.

https://blogs.mathworks.com/graphics-and-apps/2025/08/19/__from-uicontrol-to-ui-components

This article covers the following topics:

Why and when to move from uicontrol and figure to modern UI components and uifigure.

How to replace uicontrol objects with equivalent UI component functions (uicheckbox, uidropdown, uispinner, etc.).

How to update callback code to match new component properties and behaviors.

How to adopt new UI component types (like spinners) to simplify validation and improve usability.

How to configure existing components with modern options (sortable tables, auto-fitting columns, editable data).

How to apply visual styling with uistyle and addStyle to make apps more user-friendly.

How to use uigridlayout to create flexible, adaptive layouts instead of manually managing positions.

The benefits of switching from figure to uifigure for app-building workflows.

A full before-and-after example of modernizing an existing app with incremental, practical updates.

In our large open-source MATLAB Central community, there are many long-term excellent user groups. I really want to know why you have been using MATLAB for a long time, and what are its absolute advantages?
I have been using MATLAB for a long time, and there are several reasons for that:
  1. Fast ramp-up in unfamiliar domains: When I explore an unfamiliar application area or a new topic, MATLAB helps me quickly locate the canonical methods and example workflows. Its comprehensive, professional documentation — along with the related-topic links typically provided at the end of each page — makes it easy to get started intuitively and saves a lot of time that would otherwise be spent hunting for foundational knowledge across the web.
  2. A relatively cutting-edge yet reliable technical path: MATLAB’s many toolboxes evolve with the field. While updates aren’t always absolutely bleeding-edge, they generally offer approaches that balance modernity and proven reliability. This reduces the risk of wasting time on obscure or unstable algorithms and helps me follow a pragmatic, well-tested technical direction.
  3. Strong community and technical support: When I encounter a problem I first post on forums like MATLAB Answers and thoroughly investigate the issue myself. If I find a solution, I publish it to contribute back — which deepens my own understanding and helps others. If I can’t solve it alone, experienced community members often respond within hours. As a last resort, MathWorks’ official support is available and typically conducts an in-depth investigation into specific cases to help resolve the issue.
  4. ......
Also, most individuals have limited time and technical bandwidth, diving deeply into a single, narrow area can be hard to pull back from unless you are committed to that specific direction. For cutting‑edge, highly specialized research it’s often necessary to combine MATLAB with other languages (e.g., Python, C/C++) to go further.
There is a communication regarding "How can I set the text font style of a Data Cursor object interactively on a plot?". But I am not clear on the answer found in this link:
https://www.mathworks.com/matlabcentral/answers/95968-how-can-i-set-the-text-font-style-of-a-data-cursor-object
I do not know how and where to put the recommended commands. Would you please clarfity and give me more details?
Thank you.
Worth the wait: seven new online training courses and one new learning path were released with 25a, covering topics in Controls, Electrification, and Physical Modeling. This release also brings new functionality to support interactions across both MATLAB and Simulink within a single course, beginning with the new Controls courses below:
Jan Studnicka
Jan Studnicka
上次活动时间: 大约 7 小时 前

Did you know that function double with string vector input significantly outperforms str2double with the same input:
x = rand(1,50000);
t = string(x);
tic; str2double(t); toc
Elapsed time is 0.276966 seconds.
tic; I1 = str2double(t); toc
Elapsed time is 0.244074 seconds.
tic; I2 = double(t); toc
Elapsed time is 0.002907 seconds.
isequal(I1,I2)
ans = logical
1
Recently I needed to parse numbers from text. I automatically tried to use str2double. However, profiling revealed that str2double was the main bottleneck in my code. Than I realized that there is a new note (since R2024a) in the documentation of str2double:
"Calling string and then double is recommended over str2double because it provides greater flexibility and allows vectorization. For additional information, see Alternative Functionality."
Ian
Ian
上次活动时间: 2025-8-14,22:10

mlapp being a binary is a pain point for source control. It means that you either have to:
  1. have hooks in your source control system to zip/unzip a mlapp. However, The Mathworks have informed users not to rely on this as the mlapp format may change.
  2. do all your source control in MATLAB. This is non standard behaviour. Source code and source control should be independent of each other. Web front-ends to source control systems, 3rd party source control apps, CI/CD systems and much more are extremely limited in what they can do with mlapps.
I wish an mlapp could just be a directory full of the required text/other files.
Requested to post this here from reddit.
There is no call to rescan audio devices in audioPlayerRecorder, even though PortAudio has such a call. I have a measurement environment that takes a long time to initialise. If I forget to plug in my audio device, I have to do it all over again...
This just came out. @Michelle Hirsch spoke to Jousef Murad and answer his questions about the big change in the desktop in R2025a and explained what was going on behind the scene. Enjoy!
The Big MATLAB Update: Dark Mode, Cloud & the Future of Engineering - Michelle Hirsch
David
David
上次活动时间: 2025-8-12,14:30

Share your ideas, suggestions, and wishlists for improving MathWorks products. What would make the software absolutely perfect for you? Discuss your idea(s) with other community users.

Guidelines & Tips

We encourage all ideas, big or small! To help everyone understand and discuss your suggestion, please include as much detail as possible in your post:
  • Product or Feature: Clearly state which product (e.g., MATLAB, Simulink, a toolbox, etc.) or specific feature your idea relates to.
  • The Problem or Opportunity: Briefly describe what challenge you’re facing or what opportunity you see for improvement.
  • Your Idea: Explain your suggestion in detail. What would you like to see added, changed, or improved? How would it help you and other users?
  • Examples or Use Cases (optional): If possible, include an example, scenario, or workflow to illustrate your idea.
  • Related Posts (optional): If you’ve seen similar ideas or discussions, feel free to link to them for context.

Ready to share your idea?

Click here and then "Start a Discussion”, and let the community know how MATLAB could be even better for you!
Thank you for your contributions and for helping make MATLAB Central a vibrant place for sharing and improving ideas.
I'm introducing the NKTg Law, a concise model describing how an object's motion tendency depends on position (x), velocity (v), and mass (m).
Definition:
NKTg = f(x, v, m)
Key quantities:
  • NKTg₁ = x * p
  • NKTg₂ = (dm/dt) * p
where p = m * v and dm/dt is the time rate of mass change.
Interpretation:
  • NKTg₁ > 0 → tendency to move away from equilibrium
  • NKTg₁ < 0 → tendency to move toward equilibrium
  • NKTg₂ > 0 → mass variation supports motion
  • NKTg₂ < 0 → mass variation resists motion
Stable state: when x, v and m interact to preserve the motion structure.
Would you like a ready-to-run MATLAB script / Live Script to simulate and plot NKTg₁ and NKTg₂?
These got released last week and the process for using them on your local machine with MATLAB is very similar to how you use the local deepseek models as I demonstrated in my February blog post How to run local DeepSeek models and use them with MATLAB » The MATLAB Blog - MATLAB & Simulink
You need Ollama and the LLMs with MATLAB package installed (Details on how to do this in the blog post above). Then you run the following in your operating systems' command line
ollama pull gpt-oss:20b
Over to MATLAB and set up a chat session
>> chat = ollamaChat("gpt-oss:20b")
chat =
ollamaChat with properties:
ModelName: "gpt-oss:20b"
Endpoint: "127.0.0.1:11434"
TopK: Inf
MinP: 0
TailFreeSamplingZ: 1
Temperature: 1
TopP: 1
StopSequences: [0×0 string]
TimeOut: 120
SystemPrompt: []
ResponseFormat: "text"
FunctionNames: []
txt = generate(chat,"Who are you?")
txt =
"I’m ChatGPT – a conversational AI developed by OpenAI. My core is the GPT‑4 language model, which has been trained on a massive mix of text from books, websites, articles and other sources to understand and generate human‑like language. I don’t have feelings, consciousness, or a personal identity; I’m a tool that can help answer questions, brainstorm ideas, explain concepts, draft text, and more. My goal is to understand the context you give me and respond in a helpful, accurate and safe way. If there’s something specific you’d like to know or do, just let me know!"
This is the smaller of the two, new open models and it is bringing my aging desktop to its knees. My GPU is too small to do the work so I think everything is happening on the CPU and its slooooow. Will try on my Mac next
Let me know if you try this out!
Long before I joined MathWorks, I was a member of the academic Research Software Engineering (RSE) community where part of my mission was to introduce basic software engineering concepts to the research community. Things like version control, testing and even simply writing code instead of using only pointy-clicky GUIs before copying and pasting the results plot into a word document. I've seen things..........*shudders*
The RSE movement is still going very strong and I am elated that MathWorks is increasingly interacting with it. One example of such interaction is a video tutorial contributed by my colleauge @Mihaela Jarema to a comminity seminar series called 'A summer of Testing' It's linked to below
The video assumes you've never run a test before and gently guides you through the principles. Along the way you'll learn about some of MATLAB's superb testing capabilities. Things like
  • Unit testing Framework
  • Test Browser App
  • Code Coverage
  • Test Fixtures (Setup and teardown)
  • Test driven devellopment
  • Function argument validation
  • CI/CD using GitHub actions
Go check out out.
Hey cody fellows :-) !
I recently created two problem groups, but as you can see I struggle to set their cover images :
What is weird given :
  • I already did it successfully twice in the past for my previous groups ;
  • If you take one problem specifically, Problem 60984. Mesh the icosahedron for instance, you can normally see the icon of the cover image in the top right hand corner, can't you ?
  • I always manage to set cover images to my contributions (mostly in the filexchange).
I already tried several image formats, included .png 4/3 ratio, but still the cover images don't set.
Could you please help me to correctly set my cover images ?
Thank you.
Nicolas
Nicolas Douillet
Nicolas Douillet
上次活动时间: 2025-8-4,15:30

I just wanted here to share a link to some .gif animations I created over the years with Matlab :-)
I think gif animations are great supports for scientific diffusion.
Just check my file exchange to find -and why not custom / improve- some of them ;-)
Hello to all!
I would like to share with the Matlab and Simulink community this video about Neural Networks in Simulink.
This is a series of videos that use a multilayer perceptron implemented in Simulink as a case study. Why Simulink? Because it's a visual and intuitive modeling tool, you can see the forward propagation of this network and better understand the flow. The objective of this series is to show the implementation using Simulink for both simulation and Arduino, as well as its training using Matlab and Matlab with Deep Learning Toolbox, and a video of training with Python.
The video is in Spanish, but the Simulink model is available in English for the entire community; subtitles are also available.
The files are located in the first comment of each video. We hope you find it interesting and enjoyable. Best regards!
Here I share the link to the first video.
In many parts of Africa, particularly in technical universities and engineering institutes, physical laboratories are scarce or poorly equipped. This reality deeply limits the hands-on experience students deserve, especially in fields like control systems, signal processing, power electronics, and fluid mechanics.
But MATLAB and Simulink can fill part of this gap.
As an educator and researcher, I’ve made it my mission to promote MATLAB as a didactic simulation environment that brings real-world experimentation into the virtual space—affordable, accessible, and scalable. Whether simulating dynamic systems, visualizing electromagnetic fields, or tuning PID controllers interactively, students can develop strong intuition without needing costly hardware.
🔧 I’ve used MATLAB to teach:
  • Power systems and control theory without needing real generators or oscilloscopes,
  • Hydrology and environmental modeling without field sensors,
  • Robotics and AI concepts even where no robot is available.
🌍 This is more than a tool for me. It’s a bridge between educational ambition and limited infrastructure.
I dream of creating MATLAB-based virtual laboratories across African institutions. And I know I’m not alone.
Is anyone else here working on similar goals in under-resourced regions? Let’s connect and make it real.
— Patrick K.N.
As someone who grew up programming in C#, I often find myself wishing for a tighter, more native integration between MATLAB and C#.
There’s so much I dream of doing—leveraging the power of Simulink models or MATLAB’s advanced numerical libraries inside my .NET desktop or web applications. Of course, I know there are some workarounds: COM automation, MATLAB Engine API for .NET, or using MATLAB Compiler SDK… but let’s be honest: it’s not quite as seamless as I’d hope.
I imagine a world where:
  • I could directly call MATLAB functions from C# as if they were .NET assemblies, without middleware.
  • Simulink blocks could generate portable C# code (not just C/C++).
  • MATLAB UI components could be embedded in WPF/WinForms apps natively.
Until then... we make do with what we have. But the vision remains.
Anyone else here trying to bridge MATLAB and C# in their workflow? I’d love to hear your experiences or ideas!
— Patrick K.N.