主要内容

搜索

I have started a blog series on the history of image display in MATLAB. If this topic interests you, and if there is something in particular you would like me to address in the series, let me know.
Nice to have - function output argument provide code assist when said function is called
This is a feature which doesn't apear to currently exist, but I think alot of matlab users would like, particularly ones who write alot of custom classes.
Imagine i have a custom class with some properties:
classdef CustomClass < handle
properties
name (1,1) string = "default name"
varOne (1,1) double = 0
end
methods
function obj = CustomClass(name,varOne)
obj.name = name;
obj.VarOne = varOne;
end
end
end
Then imagine I have a function which returns one of these custom class objects:
function [obj] = Calculation(Var1,Var2,name)
arguments (Input)
Var1 (1,1) double
Var2 (1,1) double
end
arguments (Output)
obj (1,1) CustomClass
end
results = Var1 + Var2;
obj = CustomClass(name,result);
end
With this class and this function which returns one of these class objects, I would like the fact that I provided "(1,1) CustomClass" in the output arguemnts block of function "Calculation(Var1,Var2,name)" to trigger code assist automaticaly show me, when writing code that the retuned value from this funciton has properties "name" and "varOne" in the object.
For istance, if I write the following code with this function and the class in the Matlab search path
testObj = Calculation(1,1,"test");
testObj.varOne = 10; %the property "varOne" doesn't apear in code assist when writing this line of code
I would like that the fact function "Calcuation(Var1,Var2,name) has the output arguments block enforcing that this function must return an object of "CustomClass" to make code assist recognise that "testObj" is a "CustomClass" object, just as if testObj was an input argument to another function which had an input argument requiring that "testObj" was a "CustomClass" object.
Maybe this is a feature that may be added to matlab in future releases? (please and thank you LOL)
This is a feature which doesn't apear to currently exist, but I think alot of matlab users would like, particularly ones who write alot of custom classes.
Imagine i have a custom class with some properties:
classdef CustomClass < handle
properties
name (1,1) string = "default name"
varOne (1,1) double = 0
end
methods
function obj = CustomClass(name,varOne)
obj.name = name;
obj.VarOne = varOne;
end
end
end
Then imagine I have a function which returns one of these custom class objects:
function [obj] = Calculation(Var1,Var2,name)
arguments (Input)
Var1 (1,1) double
Var2 (1,1) double
end
arguments (Output)
obj (1,1) CustomClass
end
results = Var1 + Var2;
obj = CustomClass(name,result);
end
With this class and this function which returns one of these class objects, I would like the fact that I provided "(1,1) CustomClass" in the output arguemnts block of function "Calculation(Var1,Var2,name)" to trigger code assist automaticaly show me, when writing code that the retuned value from this funciton has properties "name" and "varOne" in the object.
For istance, if I write the following code with this function and the class in the Matlab search path
testObj = Calculation(1,1,"test");
testObj.varOne = 10; %the property "varOne" doesn't apear in code assist when writing this line of code
I would like that the fact function "Calcuation(Var1,Var2,name) has the output arguments block enforcing that this function must return an object of "CustomClass" to make code assist recognise that "testObj" is a "CustomClass" object, just as if testObj was an input argument to another function which had an input argument requiring that "testObj" was a "CustomClass" object.
Maybe this is a feature that may be added to matlab in future releases? (please and thank you LOL)
This week's Graphics and App Building blog article guides chart authors and app builders through the process of designing for a specific theme or creating theme-responsive charts and apps.
  • Learn how dark theme may impacts charts and apps
  • Discover best practices for theme-adaptive workflows
  • Step-by-step examples for both script-based plots and advanced custom charts and UI components
  • Discover new tools like ThemeChangedFcn, getTheme, and fliplightness
I'm planning to start a personal scientific software project. I used to be familiar with Matlab (quite some time ago), so Matlab would be my first choice. But I keep hearing that Matlab is old stuff and I should use Julia or something like that. I wouldn't find learning Julia difficult, so familiarity with Matlab is not an important factor. Neither is cost, because I can afford a home license for Matlab, Simulink and a few toolboxes. So I'm thinking. Please give me your input! Why should I use Matlab in 2025 instead of alternatives?
I’m quite curious as to why this particular email was sent directly to my personal inbox. I have never actively subscribed to any online or offline training services nor clicked on any related marketing links. Could it be that because I frequently visit the official MATLAB forums, someone has identified me as a potential customer for their targeted promotions?
I’d love to hear your thoughts and start a discussion on this!
Dan
Dan
上次活动时间: 2025-7-17,16:30

One of MATLAB's strengths is how easy it is to document a custom function/class. The first continuous comment block is automatially displayed by the help and doc functions, with some neat automatic formatting. For example:
% myFunc My example function
%
% This function does not do anything yet, but one day will be great. For
% example, you will be able to type:
% out=myFunc(in1,in2);
% and something cool will happen.
%
% See also otherFunc
function varargout=myFunc(varargin)
% actual code
end
will have a link to the documentation for "otherFunc", assuming that file exists. Class documentation is nicely broken up into a header (with "See also" support) followed by a property and method summary.
All the above works great with one big exception: apart from highlighting uses of the file's name, there is no way to display anything but pure text. No Markdown, no LateX, and so forth. It is possible to sneak an HTML link into the comment block, calling a MATLAB command that can display a live script with fancy formatting. I have done this in the past, although it can be a little tricky for files inside a package/namespace (folders beginning with '+').
I can envision a system where fancy documentation would be buried inside an "example" subfolder where "myFunc.m" is located. Invoking "showExample myFunc", where "showExample" is a to-be-written utility, would look for a live script inside the appropriate subfolder, make a local copy for the user to tinker with, and then display that local copy in the MATLAB editor. Since the actual function function and its example woulld obviously inside a Git repository, text-based live scripts would be used instead of an *.mlx file.
Again, this all works fine on its fine on its own, but it would be very difficult to replicate the "See also" capability or the other features of the standard doc function. So what are we to do? Is there a clever way to add another block to a standard comment block "See examples" that would automatically detect scripts in a subfolder of function/class being queried?
I know there is a way to incorporate custom documentation into MATLAB help system. This is much too cumbersome for my purposes, where many functions/classes are being added/edited all the time. The existing doc system covers maybe 80% of my needs, but sometimes a little math (LaTeX) would go a long way on explaining how things work.
群馬産業技術センター様をお招きし、製造現場での異常検知の取り組みについてご紹介いただくオンラインセミナーを開催します。
実際の開発事例を通して、MATLABを使った「教師なし」異常検知の進め方や、予知保全に役立つ最新機能もご紹介します。
✅ 異常検知・予知保全に興味がある方
✅ データ活用を何から始めればいいか迷っている方
✅ 実際の現場事例を知りたい方
ぜひお気軽にご参加ください!
Adam Danz
Adam Danz
上次活动时间: 2025-7-7,18:28

Are you a dark mode enthusiast or are you curious about how it’s shaping MATLAB graphics? Check out the latest article in the MATLAB Graphics and App Building blog.
🔹 User Insights: find out how user surveys influenced the development of graphics themes
🔹 Learn three ways to switch between light and dark themes for figures
🔹 Understand how custom and default colors behave across themes
🔹 Download a handy cheat sheet for working with themes in your graphics and apps.
Hey MATLAB enthusiasts!
I just stumbled upon this hilariously effective GitHub repo for image deformation using Moving Least Squares (MLS)—and it’s pure gold for anyone who loves playing with pixels! 🎨✨
  1. Real-Time Magic
  • Precomputes weights and deformation data upfront, making it blazing fast for interactive edits. Drag control points and watch the image warp like rubber! (2)
  • Supports affine, similarity, and rigid deformations—because why settle for one flavor of chaos?
  1. Single-File Simplicity 🧩
  • All packed into one clean MATLAB class (mlsImageWarp.m).
  1. Endless Fun Use Cases 🤹
  • Turn your pet’s photo into a Picasso painting.
  • "Fix" your friend’s smile... aggressively.
  • Animate static images with silly deformations (1).
Try the Demo!
Hi everyone,
Please check out our new book "Generative AI for Trading and Asset Management".
GenAI is usually associated with large language models (LLMs) like ChatGPT, or with image generation tools like MidJourney, essentially, machines that can learn from text or images and generate text or images. But in reality, these models can learn from many different types of data. In particular, they can learn from time series of asset returns, which is perhaps the most relevant for asset managers.
In our book (amazon.com link), we explore both the practical applications and the fundamental principles of GenAI, with a special focus on how these technologies apply to trading and asset management.
The book is divided into two broad parts:
Part 1 is written by Ernie Chan, noted author of Quantitative Trading, Algorithmic Trading, and Machine Trading. It starts with no-code applications of GenAI for traders and asset managers with little or no coding experience. After that, it takes readers on a whirlwind tour of machine learning techniques commonly used in finance.
Part 2, written by Hamlet, covers the fundamentals and technical details of GenAI, from modeling to efficient inference. This part is for those who want to understand the inner workings of these models and how to adapt them to their own custom data and applications. It’s for anyone who wants to go beyond the high-level use cases, get their hands dirty, and apply, and eventually improve these models in real-world practical applications.
Readers can start with whichever part they want to explore and learn from.
The new figure toolstrip in R2025a was designed from multiple feedback cycles with MATLAB users. See the latest article in the Graphics and App Building blog to see the evolution of the figure toolbar from 1996-2025, learn how user feedback shaped the new toolstrip, and check out the new code-generation feature that makes interactive data exporation reproducible.
I rarely use MATLAB.
10%
use MATLAB almost every day.
55%
use MATLAB once every 2-3 days.
10%
only use when specific task require
25%
20 个投票
Paul
Paul
上次活动时间: 2025-6-30,15:59

For the last day or two, I've been getting "upstream" and other various errors on Answers. Seems to come and go. Anyone else having similar issues?
You are not a jedi yet !
20%
We not grant u the rank of master !
0%
Ready are u? What knows u of ready?
0%
May the Force be with you !
80%
5 个投票
Simulinkモデルを生成AIで自動的に作成できたら便利だと思いませんか?
QiitaのSacredTubesさんは、このアイデアを実験的に試みた記事を公開しています。
その方法は、まず生成AIでVerilogコードを作成し、それをSimulinkに取り込んでモデル化するというものです。(ここではHDL Coderというツールボックスの機能が使われました:importhdl
まだ実用段階には至っていませんが、モデルベース開発(MBD)と生成AIの可能性を探る上で、非常に興味深い試みです。
生成AIの限界と可能性を考えるきっかけとして、一読の価値があります。
---
もし「Simulink Copilot」のような生成AIツールが登場するとしたら、
どんな機能があったら嬉しいと思いますか?
  • 自然言語でブロック図を生成?
  • 既存モデルの自動ドキュメント化?
  • シミュレーション結果の要約と解釈?
皆さんのアイデアをぜひシェアしてください!
Mike Croucher
Mike Croucher
上次活动时间: 2025-7-23,14:16

In a discussion on LInkedin about my recent blog post, Do these 3 things to increase the reach of your open source MATLAB toolbox, I was asked by "Could you elaborate on why someone might consider opening/sharing their code? Thinking of early-career researchers, what might be in it for them?"
I'll give my answer here but I'm more interested in yours. How would you have answered this?
This is what I said:
  • It's the right thing to do scientifically. A computational paper is essentially just an advertisement of what you've done. The code contains vital details about how you actually did it. A computational paper is incomplete without the code.
  • If you only describe your algorithm in a paper, I have to implement it before I can apply your research to my problem. If you share the code, I can get started much more quickly using your research. This means I publish faster and since I am a good scientist, this means you get cited faster.
  • Other scientists start off as users of your code. This leads to citations. Over time, some of them start deeply using and modifying your code, this leads to collaborators.
  • Once you decide to share code via something like GitHub, you quickly start adopting good software engineering practices without initially realizing it. This improves the quality of your research since adopting good software practices makes it more likely that your software will give the right answers.
That last point can be a little hard to get your head around sometimes. Even if all you do is use file upload to get your stuff onto GitHub (i.e. you're not using git properly yet) you will start to naturally converge towards better code.
Why? Because as soon as you share code, you have to solve the problem of getting it to run on someone else's machine.
A trivial example concerns hard coded paths, for example. If you only ever run it on your machine then having a line like datafile = "C:\Mystuff\data.csv" always works but it breaks as soon as I try to run it on my machine. You'll look at this and think "Maybe there's a better way to do that".
Similarly dependencies. Your Path may be full of stuff that isn't present on my machine. As soon as I try to run your code, it won't work and you'll have to figure out how to handle dependencies in a reproducible way.
Documentation! An empty README.md is no good if you expect me to know how to use your code. You at least have to say something like "To run this, type runme(N) into MATLAB where N is the size of the model...etc etc)
The act of sharing, and dealing with the consequences, leads to much better code than if you keep it to yourself.
毎回 MATLAB を立ち上げたときに実行される startup,閉じるときに実行される finish って使ってますか?
久々に startup.m を開いてみたら
format short
format compact
disp("Ready")
の3行がありました.何らかの理由で format 設定を変えたとしても次回起動したときにはお気に入りの format に戻っているというのは嬉しいですよね!
disp("Ready")
は特に意味はありませんが,表示されると「さあ,始めよう!」って気分になります.(笑)
Adam Danz
Adam Danz
上次活动时间: 2025-6-24

The MATLAB R2025a release gave figures a makeover. @Brian Knolhoff, a developer on the Figure Infrastructure and Services team, reviews the new Figure Container in the Graphics and App Building blog.
Learn the four ways to tile figures, what docking means, and other new features.