Home - MATLAB Central

An open exchange for the MATLAB and Simulink user community


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

Thumbnail

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

Thumbnail

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

© 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

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

Thumbnail

Solar Position Algorithm for Solar Radiation Applications

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

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

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

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

Adds new utilities to Fuzzy Control System Toolbox interesting for Fuzzy Control Systems.

Thumbnail

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

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

hai.. how to save image that pop up at frame show figure. I try to used this function,but the saved image not follow the dimension(X x Y) of original image. saveas(gcf,'mask_image.jpg', 'jpg') thank

1

answer

Roll the Dice! DescriptionReturn two random integers between 1 and 6, inclusive, to simulate rolling 2 dice.Example [x1,x2] = rollDice(); x1 = 5; x2 = 2; %%filetext = fileread('rollDice.m');illegal = contains(filetext, 'assignin') || contains(filetext, 'regexp');assert(...

04 - Scalar Equations 1 Define the variable a:<<http://samle.dk/STTBDP/Assignment1_4-a.png>> Use this to calculate x:<<http://samle.dk/STTBDP/Assignment1_4a.png>> %%a=10;ref = 1/(1+exp(-(a-15)/6));user = MyFunc();assert(isequal(user,ref))%%[x a] = MyFunc();assert(a==10); func...

Length of the hypotenuse Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle.<<https://i.imgur.com/73mQn4N.png>>Image courtesy of <http://upload.wikimedia.org/wikipedia/commons/7/7c/Right_Angle_Triangle.svg Wikipedia>. %%a = 1...

Simple and straight-forward implementation of DH-parameters in MATLAB.

Thumbnail

Hi! I think my problem is very simple. I have some boolean expressions in my code, which the results will always be 1 or 0 (true or false). Here are some examples: data=data+(-1*(~mat(i)&&mat(j)&&mat(k)))||(~mat(i)&&~mat(j)); or data=data+(~mat(i)); I have to convert these l...

3

answers

How do I generate a MATLAB license file on the MathWorks website? kA031000000XYGgCAO 000066423

1

answer

Solving Karnaugh Map problems.

Thumbnail

Hello, I m currently training the U-net model in the matlab I m encoutering with same kind of error again and again when i run my mainscript file in command window the error usig trainnetwork, and...

0

answer

Im new to Matlab and cnat figure out what is wrong with this code, I literally copied someones code down word for word, I keep getting the arror but they dont. if I comment out the scatter_2 and...

1

answer

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

Thumbnail

This is a bug? syms x c1 c2 real m1c(x) = heaviside(x-4)*(3*x-2)*(x-4) + c1*x + c2; simplify(diff(m1c(x),x),'All',true)

0

answer

Hi team I am using exportgrahics function within my loop to append figures as pdf files and merge them in one pdf file as a final outcome. All good except there are absolutely no margin at all. I...

0

answer

I am working on a project to analyze the correlation between fault location, fault resistance, and impedance parameters in a DC transmission system. I have the following data: Fault Current and Voltage Data: Measured at various fault locations along the DC transmission line. Fault Resistance: Da...

1

answer

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); ^^^^^^^^^^^...

1

reply

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

Description: In a series circuit, the total resistance is the sum of the individual resistances. This problem asks you to write a function that calculates the total resistance when a list of...

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

Thumbnail

aa

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

0

reply

Description:The Fibonacci sequence is defined as follows:F(1)=1,F(2)=1,F(n)=F(n−1)+F(n−2) for n2Write a function that computes the sum of all even Fibonacci numbers that do not exceed a given number NNN.Example:For N=10, the Fibonacci sequence up to 10 is:1,1,2,3,5,8The even numbers are 2 an...

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

1

reply

Shor's algorithm, proposed in 1994 by Peter Shor, is an algorithm for factoring numbers that runs in polynomial time (polynomial in the number of digits/bits of the input) on a quantum computer. It...

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

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

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

Tags:

A sequence is constructed in the following way. The zeroth term is 1, and the next terms are determined by counting the number in the sequence so far. Therefore, after the first count, the sequence...

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