Home - MATLAB Central

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

Cynthia Brewer's ColorBrewer palettes, ported to MATLAB, with nice interpolation.

Thumbnail

A minimum length 2D planar bell nozzle is designed using MOC

Thumbnail

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

In this post, I will discuss robot modeling and simulation with Simulink®, Simscape™, and Simscape Multibody™. To put things in context, I will walk you through a walking robot example (get it?).

Thumbnail

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

Determine parameters of a noisy sine function

Thumbnail

this code returns a fully trained MLP for regression using back propagation of the gradient. I dedicate this work to my son :"Lokmane ".

Thumbnail

The simulator, VANET Toolbox, currently support V2V communication with lane changing, car following activities. V2I is under development.

Thumbnail

Full code and functions for training and testing a simple neural network to recognize single digits between 0 and 9

Thumbnail

© 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

Solar Position Algorithm for Solar Radiation Applications

Thumbnail

MATLAB code for dimensionality reduction, fault detection, and fault diagnosis using KPCA.

Thumbnail

This example shows how to design a DC/DC Buck Converter controller

Thumbnail

Open Source Simulation Package for MATLAB

Thumbnail

Model used in the "Understanding Kalman Filters, Part 7: How to Use Extended Kalman Filter in Simulink" video

Thumbnail

Using DTC metod to control three phase induction motor

Thumbnail

Download code and watch video series to learn and implement deep learning techniques

Thumbnail

Model used in the "Understanding Kalman Filter, Part 6: How to Use a Kalman Filter in Simulink" video

Thumbnail

A toolbox for the computation of the Fast Marching algorithm in 2D and 3D.

Thumbnail

abfload imports data in the Axon abf format (three different recording modes).

Thumbnail

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?

Tags:

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?

Tags:

3

answers

slice stl files and create continuous contour along the slices

Thumbnail

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

Tags:

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

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

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

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

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...

Tags:

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

Tags:

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...

Categories:
Thumbnail

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 charge rate (​) of a battery can be calculated using the formula:​​where:​ is the charge added to the battery (in ampere-hours, Ah)t is the time taken to...

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...

Modelling and simulation of a quadruped robot in Simscape with tutorials

Thumbnail

b-d-Lawson is a method for the interpolation constrained rational minimax approximation.

Thumbnail

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

This is the file of dynamic model of 2DoF robotic link

Thumbnail

Some functions for cyclic manipulation of data, together with some acoustic data.

Thumbnail

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

Fuzzy Logic Tools (FLT) is a C++ framework for storage, analysis and design of fully general multiple-input multiple-output (MIMO) Takagi-Su

Thumbnail

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...

Categories:
Thumbnail

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

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

Be Part of MATLAB Central

Community Video
MATLAB Answers

Ask & Answer questions about MATLAB & Simulink!

File Exchange

Download or contribute user-submitted code!

Cody

Solve problem groups, learn MATLAB & earn badges!

Blogs

Get the inside view on MATLAB and Simulink!

Discussions

Connect with fellow users!

AI Chat Playground

Use AI to generate initial draft MATLAB code, and answer questions!

Go to top of page
Could not connect to the reCAPTCHA service. Please check your internet connection and reload to get a reCAPTCHA challenge.