An open exchange for the MATLAB and Simulink user community
Simscape electrolyzer converting water and electricity (wind/solar renewable sources) into H2 gas. Alkaline technology included.
![Thumbnail](/matlabcentral/mlc-downloads/downloads/7a36efa0-e4b6-4697-a4a9-feb5418996f1/e0de8196-a49c-49f3-afac-d552b1a415ee/images/1625759758.png)
A minimum length 2D planar bell nozzle is designed using MOC
![Thumbnail](/matlabcentral/mlc-downloads/downloads/74301faa-330f-4e37-87ea-8a2bf32bb148/5a5bfe73-b8a2-40ed-9e25-f64f822495ae/images/screenshot.png)
Hi, Community I wanna ask about how to do a Gaussian Filter in just 1D data.... So i have a data vector based on time series like this : And i want to filter the data by using Gaussian Filter. So, Anyone, How to do that? Thank you so much....
1
answer
Ka.Race.Ing-Team at Karlsruhe Institute of Technology volunteered to share in depth and hands-on their approach around vehicle controls and torque vectoring in particular. They are winners of the Simulink Student Challenge 2016. And to top it all off, Julian our guest blogger today, added two of the...
![Thumbnail](https://blogs.mathworks.com/student-lounge/wp-content/blogs.dir/16/files/2017/11/thumbnail_title-1.png)
Determine parameters of a noisy sine function
![Thumbnail](/matlabcentral/mlc-downloads/downloads/a1ca242b-82c2-4a89-b280-38d2243276da/4d399976-e76f-418a-a227-c97d2f7a85f7/images/1604235625.png)
this code returns a fully trained MLP for regression using back propagation of the gradient. I dedicate this work to my son :"Lokmane ".
![Thumbnail](/matlabcentral/mlc-downloads/downloads/a770a072-c718-4ca6-b99e-2dc84732ed9c/078bb893-5214-4c52-8a7a-db9045495a92/images/screenshot.jpg)
The simulator, VANET Toolbox, currently support V2V communication with lane changing, car following activities. V2I is under development.
![Thumbnail](/matlabcentral/images/default_screenshot.jpg)
Full code and functions for training and testing a simple neural network to recognize single digits between 0 and 9
![Thumbnail](/matlabcentral/mlc-downloads/downloads/63053fe5-602c-43dd-9fb6-df51d0b73dbe/8e8c83c7-cbd7-4698-b069-211c2dfcb25b/images/screenshot.png)
© kreutzweise.de Great ideas don’t always stand the test of time. It may be due to some drawbacks that knock out the great advantage, or it simply is too expensive or difficult to implement. The following article will share a contradicting example. Enjoy this engineering success story of originalit...
![Thumbnail](https://blogs.mathworks.com/student-lounge/wp-content/blogs.dir/16/files/2018/02/Y0A7464-Edit-1-e1517563689357.jpg)
Solar Position Algorithm for Solar Radiation Applications
![Thumbnail](/matlabcentral/mlc-downloads/downloads/submissions/59903/versions/2/screenshot.gif)
MATLAB code for dimensionality reduction, fault detection, and fault diagnosis using KPCA.
![Thumbnail](/matlabcentral/mlc-downloads/downloads/830f7424-cfc6-4e11-a75a-5717d6aceb1a/e30800d6-fc99-43d3-a092-c0e027c9887c/images/1620937000.png)
This example shows how to design a DC/DC Buck Converter controller
![Thumbnail](/matlabcentral/mlc-downloads/downloads/submissions/61420/versions/7/screenshot.jpg)
Open Source Simulation Package for MATLAB
![Thumbnail](/matlabcentral/mlc-downloads/downloads/9b77dac5-a36f-4fe7-b336-3026b3daf821/1bf32ecb-57f5-422b-87bc-ff2e76a50f5e/images/1625510508.png)
Model used in the "Understanding Kalman Filters, Part 7: How to Use Extended Kalman Filter in Simulink" video
![Thumbnail](/matlabcentral/images/default_screenshot.jpg)
Using DTC metod to control three phase induction motor
![Thumbnail](/matlabcentral/mlc-downloads/downloads/submissions/55739/versions/4/screenshot.jpg)
Download code and watch video series to learn and implement deep learning techniques
![Thumbnail](/matlabcentral/mlc-downloads/downloads/submissions/62990/versions/3/screenshot.png)
Model used in the "Understanding Kalman Filter, Part 6: How to Use a Kalman Filter in Simulink" video
![Thumbnail](/matlabcentral/images/default_screenshot.jpg)
A toolbox for the computation of the Fast Marching algorithm in 2D and 3D.
![Thumbnail](/matlabcentral/mlc-downloads/downloads/submissions/6110/versions/3/screenshot.jpg)
abfload imports data in the Axon abf format (three different recording modes).
![Thumbnail](/matlabcentral/images/default_screenshot.jpg)
Hi I've a question about matlab simulink when I run a code, there are message "MATLAB cannot run this file because c:\~~~ shadows it. delete shadowing file and try again" what's the problem? And why this happen??
4
answers
How can I download 2011b version of MATLAB?
5
answers
This keeps coming up as an error, what am I doing wrong? prompt= 'State your name, Your Grace '; name=input(prompt);
2
answers
I'm new to MATLAB and am still getting used to the workspace. When I open a new file or script, it always comes out in a new window. How can I get it to be opened in the same window as the commands? Thanks!
2
answers
Hello , I want to concatenate string and number in for loop requestID = Req_Check; for k = 1 : 10 requestID = requestID +1; end I am expecting requestID after for loop like Req_Check_1, Req_Check_2 ...Req_Check_10 How can I do this?
3
answers
y25=[1.875000000000000,3.046875000026040] How can I add 0 (zero) to the beginning of this array? I want to get the array y25=[0,1.875000000000000,3.046875000026040] Thank You.
1
answer
I installed MATLAB and now, I buy new toolbox. To install new one, should I reinstall MATLAB? or can I install new toolbox only?
3
answers
slice stl files and create continuous contour along the slices
Given an unsigned integer x, find the largest y by rearranging the bits in x Given an unsigned integer x, find the largest y by rearranging the bits in x.Example: Input x = 10 Output y is 12since 10 in binary is 1010 and 12 in binary is 1100. %%x = 76;y_correct = 112;assert(isequal(maxit(x),y_corre...
Can i make Title and x and y label of a plot Bold and to increasr their font size
3
answers
Check if number exists in vector Return 1 if number a exists in vector b otherwise return 0.a = 3;b = [1,2,4];Returns 0.a = 3;b = [1,2,3];Returns 1. %%a = 1;b = [1,2];y_correct = 1;assert(isequal(existsInVector(a,b),y_correct))%%a = 12;b = [1,3,4,5,6,7,8,1,2];y_correct = 0;assert(isequal(existsInVec...
Adds new utilities to Fuzzy Control System Toolbox interesting for Fuzzy Control Systems.
![Thumbnail](/matlabcentral/images/default_screenshot.jpg)
Hi, I'm trying to convert Unix time stamps to date time. So far I have tried: date_time=(timestamp_array./86400000) + datetime(1970,1,1); This seems to work find, except that my first measurment was 2123 seconds off. I looked at a few other times and they were 2122 seconds off, 2125 seconds off...
2
answers
Simulate articulated robotic arm
![Thumbnail](/matlabcentral/mlc-downloads/downloads/submissions/58255/versions/1/screenshot.png)
Today I’d like to introduce a guest blogger, Jiro Doke (email: Jiro.Doke@mathworks.com), who is an applications engineer here at The MathWorks. He used MATLAB in his life prior to The MathWorks, and one of his interests is data visualization. Contents Load Data Create Basic Plot Adjust Line Prope...
![Thumbnail](https://blogs.mathworks.com/images/loren/118/pubQualityGraphics_01.png)
Hi, I have two subplots displayed side-by-side in one figure window, as shown. Now, the aspect ratio (width-to-height ratio) of each photo is fixed, as is the proportion of the two images in relation to one another. I'd like to make the photos larger while keeping the size of the figure window ...
1
answer
it use Machine Learning in MATLAB to predict the buying-decision of Stock by using real life data.
![Thumbnail](/matlabcentral/mlc-downloads/downloads/90659e8b-6c27-4b84-889c-b1299afe3c67/0fc4e584-68a8-4a9b-a220-7f8e28db7b5e/images/screenshot.png)
Remove element(s) from cell array You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty. For exampleA = 1:10A(5) = []results in1 2 3 4 6 7 8 9 10You task is to find the shortest, elegant, way in Matlab to do the same for cell ...
i am using the following code in my 3D FEM analysis digits(16) k_bc=vpa(k_bc); U=k_bc\f_bc. residual=norm(k_bc*U-f_bc). Now to decrease the residual i have taken the variable to symbolic domain.Now when i use vpa i loose my sparcity of stiffness matrix causing a slow calculation rate but give lo...
0
answer
I need to compare the responses of various model's parametrs , I'm using the multiple simulations panel in the simulink editor to run multiple simulations with varying values. I'm viewing the results in simulation manager, so I need to see as well the time-domain responses per multip...
0
answer
Matlab fundamentals course: 7.Conditional Data Selection - Logical Indexing(5/5) - Visualizing Cricket Statistics
1
answer
Hello, I want to import my own drive cycle, but i face error whenever i try importing through drive cycle source in MATLAB model generated through virtual vehicle composer. This error is arising...
0
answer
Shrinking_bvp4c() function Shrinking_bvp4c clc clear all clear all % defining parameters k=0.5,K=0.8,M=0.3,S=2.0; sol1 = bvpinit(linspace(0,20,25),[1 1 1 0]); sol = bvp4c(@bvp2D,@bc2D,sol1); x = sol.x; y = sol.y; %%% Plotting of the velocity figure (1) plot(x, y(2, :) ,'linewidth', 1) ho...
0
answer
In a Battery Management System (BMS), the lifetime of a battery depends on various factors, including the Depth of Discharge (DoD), load profile, and the battery's cycle life. The cycle life of a battery is the number of complete charge-discharge cycles the battery can undergo before its cap...
In Electric Vehicles (EVs), the driving range is the estimated distance a vehicle can travel on a fully charged battery. The range (R) can be calculated using the formula:where: is the total battery capacity (in kilowatt-hours, kWh) is the efficiency factor of the EV drivetrain (as a decimal, ...
In a Battery Management System (BMS), estimating the backup time of a battery-powered inverter helps determine how long it can supply power during an outage. The backup time (T) can be calculated using the formula:where: is the battery capacity (in ampere-hours, Ah) is the battery voltage (in...
Mike is spreading some MATLAB Valentines joy over on the MATLAB Blog. Here is MathWorker Jonathan Gale's ode to the Mapping Toolbox and the Bonne spherical projection. What would your caption for...
![Thumbnail](https://blogs.mathworks.com/community/files/VBonne.gif)
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...
0
reply
In a Battery Management System (BMS), the State of Health (SoH) of a battery is an indicator of its overall condition. It is calculated by comparing the current capacity of the battery with its...
b-d-Lawson is a method for the interpolation constrained rational minimax approximation.
![Thumbnail](/matlabcentral/images/default_screenshot.jpg)
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); ^^^^^^^^^^^...
3
replies
Some functions for cyclic manipulation of data, together with some acoustic data.
![Thumbnail](/matlabcentral/mlc-downloads/downloads/3687fed3-a875-4cc3-bcdb-947bfedc37b8/629aaec3-26e0-4395-a7c3-5bd63b391a45/images/1739467644.png)
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 ...
2
replies
I've been sharing mathematical equations with some sort of connection to Valentine's day for a long time now. Indeed, the first time I did it was 17 years ago on my old WalkingRandomly blog and I've repeated variations of this several time since. It's a very obvious social media post...
![Thumbnail](http://blogs.mathworks.com/matlab/files/2025/02/rotatingHeart.gif)
Fuzzy Logic Tools (FLT) is a C++ framework for storage, analysis and design of fully general multiple-input multiple-output (MIMO) Takagi-Su
![Thumbnail](/matlabcentral/images/default_screenshot.jpg)
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 ...
0
reply
In today's blog, Khushin Lakhara from the Student Programs team at MathWorks will explore the concept of sensitivity analysis and its significance in engineering design. Over to you, Khushin... For this blog, our attention will be on the student competition score function, especially competiti...
![Thumbnail](https://blogs.mathworks.com/student-lounge/files/2025/02/Social-Media-Collateral-scaled.jpg)
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 c...
1
reply
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)
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)
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...
63
replies
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)
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
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)
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)
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)
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...
5
answers
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)
Interactive module on signal processing theory and real-world applications.
![Thumbnail](/matlabcentral/mlc-downloads/downloads/77c23e0e-a84c-4b1f-815a-7880913488cf/7efe6c8f-09b7-468f-b594-7cb2b5f5322f/images/1724098053.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)
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
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)
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)
I am attempting to run MATLAB on my virtual machine. When I do so, however, MATLAB crashes with references to "vm3dgl64.dll" in the stack trace, such as the snippets below: [ 2] 0x00007ffd5899e3fe C:\Program Files\MATLAB\R2024a\bin\win64\libmwfl.dll+00058366 [ 5] 0x00007ffd3fd2c5bf C:\...
1
answer
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 ...
Hello, I have a plot consisting of "square-ish" TTL pulses and I want to be able to 1: Extract the data thats in the "Zoomed" XLim, and then 2: Find the x-location of each rising edge at a certain...
1
answer
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
Delete rows with specific properites as following:Find rows that have a negative value in any element of the row and delete it.Check if the last element of the row is equal of bigger than 24 and...
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!