어서 오세요!

토론은 여러분이 동료를 만나고 더 큰 과제를 함께 해결하며 그 과정에서 즐거움을 찾을 수 있는 공간입니다.

  • 최신 업데이트를 보고 싶으신가요? Highlights를 팔로우하세요!
  • MATLAB 또는 Simulink 활용 능력을 향상시킬 수 있는 기법을 찾고 계신가요? Tips & Tricks에서 찾을 수 있습니다!
  • 수학 관련 농담, 언어유희 또는 밈을 공유하고 싶으신가요? Fun에서 할 수 있습니다!
  • 다른 채널이 필요하다고 생각하시나요? Ideas에서 자세히 알려주세요.

업데이트된 토론


私の場合、前の会社が音楽認識アプリの会社で、アルゴリズム開発でFFTが使われていたことがきっかけでした。でも、MATLABのすごさが分かったのは、機械学習のオンライン講座で、Andrew Ngが、線型代数を使うと、数式と非常に近い構文のコードで問題が処理できることを学んだ時でした。

The MATLAB AI Chat Playground is now open to the whole community! Answer questions, write first draft MATLAB code, and generate examples of common functions with natural language.
The playground features a chat panel next to a lightweight MATLAB code editor. Use the chat panel to enter natural language prompts to return explanations and code. You can keep chatting with the AI to refine the results or make changes to the output.
MATLAB AI Chat Playground
Give it a try, provide feedback on the output, and check back often as we make improvements to the model and overall experience.
This topic is for discussing highlights to the current R2025a Pre-release.
Since May 2023, MathWorks officially introduced the new Community API(MATLAB Central Interface for MATLAB), which supports both MATLAB and Node.js languages, allowing users to programmatically access data from MATLAB Answers, File Exchange, Blogs, Cody, Highlights, and Contests.
I’m curious about what interesting things people generally do with this API. Could you share some of your successful or interesting experiences? For example, retrieving popular Q&A topics within a certain time frame through the API and displaying them in a chart.
If you have any specific examples or ideas in mind, feel free to share!
imad
imad
최근 활동: 2025년 2월 14일 16:42

Simulink has been an essential tool for modeling and simulating dynamic systems in MATLAB. With the continuous advancements in AI, automation, and real-time simulation, I’m curious about what the future holds for Simulink.
What improvements or new features do you think Simulink will have in the coming years? Will AI-driven modeling, cloud-based simulation, or improved hardware integration shape the next generation of Simulink?
On my computers, this bit of code produces an error whose cause I have pinpointed,
load tstcase
ycp=lsqlin(I, y, Aineq, bineq);
Error using parseOptions
Too many output arguments.
Error in lsqlin (line 170)
[options, optimgetFlag] = parseOptions(options, 'lsqlin', defaultopt);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The reason for the error is seemingly because, in recent Matlab, lsqlin now depends on a utility function parseOptions, which is shadowed by one of my personal functions sharing the same name:
C:\Users\MWJ12\Documents\mwjtree\misc\parseOptions.m
C:\Program Files\MATLAB\R2024b\toolbox\shared\optimlib\parseOptions.m % Shadowed
The MathWorks-supplied version of parseOptions is undocumented, and so is seemingly not meant for use outside of MathWorks. Shouldn't it be standard MathWorks practice to put these utilities in a private\ folder where they cannot conflict with user-supplied functions of the same name?
It is going to be an enormous headache for me to now go and rename all calls to my version of parseOptions. It is a function I have been using for a long time and permeates my code.
For Valentine's day this year I tried to do something a little more than just the usual 'Here's some MATLAB code that draws a picture of a heart' and focus on how to share MATLAB code. TL;DR, here's my advice
  1. Put the code on GitHub. (Allows people to access and collaborate on your code)
  2. Set up 'Open in MATLAB Online' in your GitHub repo (Allows people to easily run it)
I used code by @Zhaoxu Liu / slandarer and others to demonstrate. I think that those two steps are the most impactful in that they get you from zero to one but If I were to offer some more advice for research code it would be
3. Connect the GitHub repo to File Exchange (Allows MATLAB users to easily find it in-product).
4. Get a Digitial Object Identifier (DOI) using something like Zenodo. (Allows people to more easily cite your code)
There is still a lot more you can do of course but if everyone did this for any MATLAB code relating to a research paper, we'd be in a better place I think.
What do you think?
Walter Roberson
Walter Roberson
최근 활동: 2025년 2월 13일 17:10

At the present time, the following problems are known in MATLAB Answers itself:
  • Symbolic output is not displaying. The work-around is to disp(char(EXPRESSION)) or pretty(EXPRESSION)
  • Symbolic preferences are sometimes set to non-defaults
Chen Lin
Chen Lin
최근 활동: 2025년 2월 13일 16:38

Have you ever wanted to search for a community member but didn't know where to start? Or perhaps you knew where to search but couldn't find enough information from the results? You're not alone. Many community users have shared this frustration with us. That's why the community team is excited to introduce the new ‘People’ page to address this need.
What Does the ‘People’ Page Offer?
  1. Comprehensive User Search: Search for users across different applications seamlessly.
  2. Detailed User Information: View a list of community members along with additional details such as their join date, rankings, and total contributions.
  3. Sorting Options: Use the ‘sort by’ filter located below the search bar to organize the list according to your preferences.
  4. Easy Navigation: Access the Answers, File Exchange, and Cody Leaderboard by clicking the ‘Leaderboards’ button in the upper right corner.
In summary, the ‘People’ page provides a gateway to search for individuals and gain deeper insights into the community.
How Can You Access It?
Navigate to the global menu, click on the ‘More’ link, and you’ll find the ‘People’ option.
Now you know where to go if you want to search for a user. We encourage you to give it a try and share your feedback with us.
Steve Eddins
Steve Eddins
최근 활동: 2025년 2월 13일 16:18

General observations on practical implementation issues regarding add-on versioning
I am making updates to one of my File Exchange add-ons, and the updates will require an updated version of another add-on. The state of versioning for add-ons seems to be a bit of a mess.
First, there are several sources of truth for an add-on’s version:
  • The GitHub release version, which gets mirrored to the File Exchange version
  • The ToolboxVersion property of toolboxOptions (for an add-on packaged as a toolbox)
  • The version in the Contents.m file (if there is one)
Then, there is the question of how to check the version of an installed add-on. You can call matlab.addon.installedAddons, which returns a table. Then you need to inspect the table to see if a particular add-on is present, if it is enabled, and get the version number.
If you can get the version number this way, then you need some code to compare two semantic version numbers (of the form “3.1.4”). I’m not aware of a documented MATLAB function for this. The verLessThan function takes a toolbox name and a version; it doesn’t help you with comparing two versions.
If add-on files were downloaded directly and added to the MATLAB search path manually, instead of using the .mtlbx installer file, the add-on won’t be listed in the table returned by matlab.addon.installedAddon. You’d have to call ver to get the version number from the Contents.m file (if there is one).
Frankly, I don’t want to write any of this code. It would take too long, be challenging to test, and likely be fragile.
Instead, I think I will write some sort of “capabilities” utility function for the add-on. This function will be used to query the presence of needed capabilities. There will still be a slight coding hassle—the client add-on will need to call the capabilities utility function in a try-catch, because earlier versions of the add-on will not have that utility function.
I also posted this over at Harmonic Notes
Are there parts of MATLAB that could disappear as far as you were concerned, things you don't need or which were "bad ideas" or which cause more trouble than they are worth in your experience?
One suggestion per answer please, so we can see how other people feel about the same matters.
Los invito a conocer el libro "Sistemas dinámicos en contexto: Modelación matemática, simulación, estimación y control con MATLAB", el cual estará disponible pronto en formato digital.
El libro integra diversos temas de los sistemas dinámicos desde un punto de vista práctico utilizando programas de MATLAB y simulaciones en Simulink y utilizando métodos numéricos (ver enlace). Existe mucho material en el blog del libro con posibilidades para comentarios, propuestas y correcciones. Resalto los casos de estudio
Creo que el libro les puede dar un buen panorama del área con la posibilidad de experimentar de manera interactiva con todo el material de MATLAB disponible en formato Live Script. Lo mejor es que se pueden formular preguntas en el blog y hacer propuestas al autor de ejercicios resueltos.
Son bienvenidos los comentarios, sugerencias y correcciones al texto.
Daniele Lupo
Daniele Lupo
최근 활동: 2025년 2월 12일 11:32

Hi to all.
I'm trying to learn a bit about trading with cryptovalues. At the moment I'm using Freqtrade (in dry-run mode of course) for automatic trading. The tool is written in python and it allows to create custom strategies in python classes and then run them.
I've written some strategy just to learn how to do, but now I'd like to create some interesting algorithm. I've a matlab license, and I'd like to know what are suggested tollboxes for following work:
  • Create a criptocurrency strategy algorythm (for buying and selling some crypto like BTC, ETH etc).
  • Backtesting the strategy with historical data (I've a bunch of json files with different timeframes, downloaded with freqtrade from binance).
  • Optimize the strategy given some parameters (they can be numeric, like ROI, some kind of enumeration, like "selltype" and so on).
  • Convert the strategy algorithm in python, so I can use it with Freqtrade without worrying of manually copying formulas and parameters that's error prone.
  • I'd like to write both classic algorithm and some deep neural one, that try to find best strategy with little neural network (they should run on my pc with 32gb of ram and a 3080RTX if it can be gpu accelerated).
What do you suggest?
I got thoroughly nerd-sniped by this xkcd, leading me to wonder if you can use MATLAB to figure out the dice roll for any given (rational) probability. Well, obviously you can. The question is how. Answer: lots of permutation calculations and convolutions.
In the original xkcd, the situation described by the player has a probability of 2/9. Looking up the plot, row 2 column 9, shows that you need 16 or greater on (from the legend) 1d4+3d6, just as claimed.
If you missed the bit about convolutions, this is a super-neat trick
[v,c] = dicedist([4 6 6 6]);
bar(v,c)
% Probability distribution of dice given by d
function [vals,counts] = dicedist(d)
% d is a vector of number of sides
n = numel(d); % number of dice
% Use convolution to count the number of ways to get each roll value
counts = 1;
for k = 1:n
counts = conv(counts,ones(1,d(k)));
end
% Possible values range from n to sum(d)
maxtot = sum(d);
vals = n:maxtot;
end

I don't like the change
16%
I really don't like the change
29%
I'm okay with the change
24%
I love the change
11%
I'm indifferent
11%
I want both the web & help browser
11%
추천 수: 38
Let's say you have a chance to ask the MATLAB leadership team any question. What would you ask them?
MATLAB FEX(MATLAB File Exchange) should support Markdown syntax for writing. In recent years, many open-source community documentation platforms, such as GitHub, have generally supported Markdown. MATLAB is also gradually improving its support for Markdown syntax. However, when directly uploading files to the MATLAB FEX community and preparing to write an overview, the outdated document format buttons are still present. Even when directly uploading a Markdown document, it cannot be rendered. We hope the community can support Markdown syntax!
BTW,I know that open-source Markdown writing on GitHub and linking to MATLAB FEX is feasible, but this is a workaround. It would be even better if direct native support were available.
I am very pleased to share my book, with coauthors Professor Richard Davis and Associate Professor Sam Toan, titled "Chemical Engineering Analysis and Optimization Using MATLAB" published by Wiley: https://www.wiley.com/en-us/Chemical+Engineering+Analysis+and+Optimization+Using+MATLAB-p-9781394205363
Also in The MathWorks Book Program:
Chemical Engineering Analysis and Optimization Using MATLAB® introduces cutting-edge, highly in-demand skills in computer-aided design and optimization. With a focus on chemical engineering analysis, the book uses the MATLAB platform to develop reader skills in programming, modeling, and more. It provides an overview of some of the most essential tools in modern engineering design.
Chemical Engineering Analysis and Optimization Using MATLAB® readers will also find:
  • Case studies for developing specific skills in MATLAB and beyond
  • Examples of code both within the text and on a companion website
  • End-of-chapter problems with an accompanying solutions manual for instructors
This textbook is ideal for advanced undergraduate and graduate students in chemical engineering and related disciplines, as well as professionals with backgrounds in engineering design.