An open exchange for the MATLAB and Simulink user community
This example project can be used as a reference design to get started with designing Battery Management System with MATLAB and Simulink.
Simulink and Powertrain Blockset models for the Vehicle Modeling series
Flexible Statistics Data Analysis Toolbox
![Thumbnail](/matlabcentral/mlc-downloads/downloads/8e8c500e-aff8-451e-a8c3-34923090f70d/8b0dba93-0079-4fbe-8393-9ae18e0d9f17/images/primaryScreenShot.jpg)
what is the meaning of *index exceeds array bound*
2
answers
Example simple Microgrid with library of PQ-based Renewables and Diesel GenSets.
![Thumbnail](/matlabcentral/mlc-downloads/downloads/submissions/67060/versions/1/screenshot.jpg)
Simulink model used in the "Understanding Model Predictive Control, Part 6" MATLAB Tech Talk
![Thumbnail](/matlabcentral/mlc-downloads/downloads/d4d6dcac-504d-4511-89e3-a986fbd8d991/2853f67c-3e91-4a1d-aba6-90945d625855/images/screenshot.jpg)
Hi, I want to convert a transfer function to controllable and observable canonical form for the num = [4]; den = [1 0.8 4]; Gp = tf (num , den) Gp = 4 --------------- s^2 + 0.8 s + 4
3
answers
Transient stability analysis of IEEE 9 bus system.
Open Source Simulation Package for MATLAB
![Thumbnail](/matlabcentral/mlc-downloads/downloads/9b77dac5-a36f-4fe7-b336-3026b3daf821/1bf32ecb-57f5-422b-87bc-ff2e76a50f5e/images/1625510508.png)
this file include mppt for wind turbine whith P&O
![Thumbnail](/matlabcentral/images/default_screenshot.jpg)
Today’s guest blogger is Shyam Keshavmurthy, Application Engineer focused on AI applications, here to talk about Surrogate Models. Background System modeling is used in applications such as electric vehicles and energy systems, and plays a pivotal role in understanding system behavior, system degra...
![Thumbnail](https://blogs.mathworks.com/deep-learning/files/2021/03/GettyImages-95769783-150x150.jpg)
This image processing routine can detect tumors presence,location,area,boundary.
![Thumbnail](/matlabcentral/images/default_screenshot.jpg)
DC/DC Boost Converter can be used to maintain the DC bus voltage
This post is from Brian Douglas, YouTube Content Creator for Control Systems and Deep Learning Applications For about a decade, I've wanted to implement this silly idea I had of measuring the acceleration of a person's hand to count the number of times they high five throughout the day. ...
![Thumbnail](https://blogs.mathworks.com/deep-learning/files/2021/06/high_five_gif_smaller.gif)
Connect MATLAB to Ollama™ for local LLMs, OpenAI® Chat Completions API, and Azure® OpenAI Service.
Import and export AI models between PyTorch®, TensorFlow™, and MATLAB®.
![Thumbnail](https://blogs.mathworks.com/deep-learning/wp-content/blogs.dir/17/files/2024/04/interop-1.png)
Everyone's talking about Large Language Models (LLMs) and a huge number of you are using them too. Here are 4 ways to make use of them in the MathWorks ecosystem right now, no matter what your skill level is.
An introduction to importing, visualizing, and analyzing climate data in MATLAB.
A set of MATLAB functions for downloading and handling earthquake data from the International Seismological Centre (ISC)
A set of low-level functions and tutorials for analyzing and displaying Earth science data.
Learn how to apply machine learning and deep learning
Discover pretrained models for deep learning in MATLAB
I thought this would be a simple problem but I'm missing something. Please reference the attached Simulink file (comm.slx). There aren't many examples using the CPFSK blocks (modulater/demodulator) and none that come from MathWorks. No matter which valid configuration I use for the CPFSK...
0
answer
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 desc...
0
reply
Hello, I have to solve the following system of pdes: The code below uses pdepe to solve it, but it returned the error: "Spatial discretization has failed. Discretization supports only parabolic and elliptic equations, with flux term involving spatial derivative." Could anyone help solv...
1
answer
My current activation of MATLAB is on a computer that has been locked out by bitlocker. I have lost the bitlocker key to open the computer and so I have installed MATLAB on another computer. I cannot...
1
answer
I am really inexperienced with Simulink and am trying to simulate a very famous guitar pedal circuit from the 1960's but am unable to run it. Q1 and Q2 can be modeled after NKT275, AC128 or SFT363E...
1
answer
FFT computed by the custom split‑radix FFT algorithm and compare it with MATLAB built‑in FFT output.
![Thumbnail](/matlabcentral/images/default_screenshot.jpg)
Hello supporter, I have a question about generating code,that it gets some error .( Model Action Rebuild Reason ================================================================= ltj Failed Code generation information file does not exist. 0 of 1 models built (0 models already up to date) Build du...
1
answer
This program calculates quantum sensor measured magnetoencephalography with semi complex filtering algorithm to show mainly delta wave.
![Thumbnail](/matlabcentral/images/default_screenshot.jpg)
LUTool provides an interactive animation of Gaussian elimination, the most important algorithm in technical computing.
![Thumbnail](https://blogs.mathworks.com/cleve/files/LUTool_ico.png)
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...
0
reply
DIF FFT Radix 2 FFT algorithm Implementation with problem
![Thumbnail](/matlabcentral/images/default_screenshot.jpg)
DIT FFT Radix 2 Algorithm Implementation with problem
![Thumbnail](/matlabcentral/images/default_screenshot.jpg)
I maintain some MATLAB web apps that are used internally by other MathWorkers. For one of the apps, I want to allow users to save default settings for the app's behavior. I think I will provide this...
![Thumbnail](https://blogs.mathworks.com/videos/files/thumb-play-arrow-11.jpg)
The following blog was written by Marshall Alphonso Principal Engineer and Sara Galante, Senior Finance Application Engineer at MathWorks Watch the full webinar Custom Portfolio Optimization: Balancing Objectives, Constraints, and Efficiency here, download the slides or download the code here. Por...
![Thumbnail](http://blogs.mathworks.com/finance/files/2025/02/custom-1024x662.png)
Marmosets, small primates native to South America, are known to be highly social primates. Living in family-based groups of up to 15 individuals, they use a complex system of vocalizations for communication. These sounds range from high-pitched calls to trills and whistles that are referred to as “p...
![Thumbnail](https://blogs.mathworks.com/headlines/files/2025/02/GettyImages-154534932-1024x680.jpg)
I noticed recently that my data is no longer updating on thingspeak again. Is there a connectivity issues with thingspeak Data not updating on thingspeak There are no connectivity issues. Take a look at some public channels that have been continuously updating for a while: ...
1
reply
my code is as below: #include "DHT.h" #define DHTPIN 15 // what pin we're connected to #define DHTTYPE DHT11 DHT dht(DHTPIN, DHTTYPE); #define THINGSPEAK_API_KEY "1P4RY69D3YMP9R5W" #include SoftwareSerial.h #include OneWire.h #include DallasTemperature....
2
replies
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: ...
3
replies
Almost immediately after the DeepSeek-R1 AI models were made available to the world, people started asking how you can use them in MATLAB. Late last week, Vasileios Papanastasiou, a software test engineer at MathWorks, posted how to do this on LinkedIn and this morning I tried out his instructions f...
![Thumbnail](http://blogs.mathworks.com/matlab/files/2025/02/DeepSeek_3-1.png)
Find the value of x so that y=2 %%x = 1;y_correct = 2;assert(isequal(your_fcn_name(x),y_correct)) function y = your_fcn_name(x)x=y = x+1;end easy
This topic is for discussing highlights to the current R2025a Pre-release. R2025a Pre-release highlights One of the changes is the built-in support for Dark Mode and Themes. Personally I find Dark...
58
replies
Hi everyone The R2025a pre-release is now available to licensed users. I highly encourage you to download, give it a try and give us some feedback. The first thing I tried was switching to Dark mode. Here's the magic s = settings; s.matlab.appearance.MATLABTheme.PersonalValu...
6
replies
Since its April 2023 launch, the MATLAB extension for Visual Studio Code has been extremely popular with over 329,000 installs via the Visual Studio Marketplace at the time of writing. Our development approach to this extension has been to release early and often, responding to feedback from the com...
![Thumbnail](https://blogs.mathworks.com/matlab/wp-content/blogs.dir/26/files/2024/12/VSCodeDebug_4.gif)
This curriculum module contains interactive examples that teach fundamental concepts of power electronics.
![Thumbnail](/matlabcentral/mlc-downloads/downloads/1d0fee91-998e-4a26-b5b3-61beac23c691/c0b9bf90-87b0-45f0-9c71-4e635c076cd7/images/1729801879.png)
Everyone's talking about Large Language Models (LLMs) and a huge number of you are using them too. Here are 4 ways to make use of them in the MathWorks ecosystem right now, no matter what your skill...
![Thumbnail](https://blogs.mathworks.com/matlab/wp-content/blogs.dir/26/files/2024/10/llm_2.png)
Back in April last year, I announced the MATLAB extension for Visual Studio Code on The MATLAB Blog and everyone at MathWorks was blown away by its popularity. In less than a year there have been...
![Thumbnail](https://blogs.mathworks.com/matlab/wp-content/blogs.dir/26/files/2024/03/VSCodeRun_4.gif)
This model demonstrates an ESS powered by solar which integrates renewable energy sources with an efficient battery storage mechanism
![Thumbnail](/matlabcentral/mlc-downloads/downloads/346a3ff7-1638-443c-bd5c-3c874b58a0be/cbb3f4e4-d6db-41d4-98b0-699ae8904643/images/thumbnail.png)
Representing the culmination of millions of person-hours of work conducted by thousands of engineers around the world, the latest release of MATLAB is always something of a celebration here at MathWorks. R2024b is no exception with thousands of new features, updates, improvements and bug fixes acros...
![Thumbnail](https://blogs.mathworks.com/matlab/wp-content/blogs.dir/26/files/2024/09/r2024bRelease_ver3_4.gif)
Star Trek may have introduced the masses to the concept of a warp drive, but early references to this mode of travel date back to the 1930s in Jack Williamson’s science fiction novel, The Cometeers. Warp drives have been sprinkled throughout science fiction, but the “science” part has remained elusi...
![Thumbnail](https://blogs.mathworks.com/headlines/files/2024/09/GettyImages-1400105417-1024x576.jpg)
In the past two years, large language models have brought us significant changes, leading to the emergence of programming tools such as GitHub Copilot, Tabnine, Kite, CodeGPT, Replit, Cursor, and many others. Most of these tools support code writing by providing auto-completion, prompts, and sugg...
8
replies
Courseware teaching battery systems' basics, focusing on design and modeling with MATLAB, Simulink and Simscape.
![Thumbnail](/matlabcentral/mlc-downloads/downloads/c0809613-f0eb-4f36-8255-2809a3810bd1/8004b36d-9978-4d54-9794-d21511f95e5f/images/1726505905.png)
On 3 of my students' laptops that have Matlab installed, regardless of whether I use the publish function in the Command Window, or the publish tab at the top, I cannot get Matlab to generate a pdf. It gives me the same error on all 3 laptops: Error using mlreportgen.re.internal.xml.transfor...
4
answers
Vehicle templates with multibody suspension and electric powertrain sized for Formula Student competitions.
![Thumbnail](/matlabcentral/mlc-downloads/downloads/d27ece47-e708-4932-8c87-08a086485d4e/9fee1390-5ecf-4fbf-8277-0cb162901f31/images/1725635395.png)
Try new Beta features to create, visualize, and run pipelines for machine learning workflows.
![Thumbnail](/matlabcentral/mlc-downloads/downloads/a7791dc8-a7fe-4eda-b23e-ab0e8a6a9338/88706cb1-25ac-4633-95c0-d1cb63d11291/images/1718917148.png)
Given a continuousTimeStateSpaceModel comprising the matrices A, B, C, and D (albeit D = 0) and given a sample time Ts, how does discreteTimeStateSpaceModel = c2d(continuousTimeStateSpaceModel,Ts,method) comprising the matrices Ad, Bd, C, and D work for both 'zoh' and 'foh' as me...
2
answers
Remove the row that contain the max value in the matrix?If you like the problem, please like it :) %%x = [1 2 3 4 5 6 ...
The idea is to swap between second and second last rowEx = [1 2 3 4 5; 5 4 3 2 1; 1 2 3 4 5; 1 2 3 4 5; ...
There is anyway for contacting support of of matlabwebsite? have any support team?
2
answers
We kmow OTF and PSF are continuous, can be interpolate inside it (cutoff freq ) even when we express them wIth matrix use integer row&col coordinate . now I have a image, and get its FFT2, and find...
1
answer
I have three TEM images taken at different tilt angles, each showing grain boundaries. However, some grain boundaries are missing in each image. I need a MATLAB code to overlay or merge these three...
3
answers
Explore Community Areas
Ask & Answer questions about MATLAB & Simulink!
Download or contribute user-submitted code!
Solve problem groups, learn MATLAB & earn badges!
Get the inside view on MATLAB and Simulink!
Connect with fellow users!
Use AI to generate initial draft MATLAB code, and answer questions!