Answered
how to use the anfis command
Hi @Alessio Centamore I think the syntax is for old anfis() input arguments. OutputFismat = anfis(dati_all, FisMatrix, [40 nan...

3 years ago | 0

Answered
Why is the output u always 0.166instead of 0 when my input e and es are both 0
Hi @罗雪峰 罗 The reason is because output 0.166 is computed from the Center of Area (CoA) defuzzification method. During the initi...

3 years ago | 2

| accepted

Answered
How do I use a root locus to find a value of K such that the damping ratio of dominant closed loop poles is a specified value?
Hi @Thomas and @Luke McDevitt The steps are generally described in the following documentation, as well as in most undergrad co...

3 years ago | 1

Answered
Obtaining MIMO kinematic model (+ controller) using data-driven approaches
Hi @mgf_04 This sounds like a system identification problem. If you have the System Identification Toolbox™ installed, then try...

3 years ago | 0

Answered
how to sine wave plot
Hi @Raouf You can scroll down and find one example that is related to plotting a sine wave. 😉 help fplot

3 years ago | 0

Answered
Derivative of state '1' in block 'PP_poly/Integrator1' at time 0.0 is not finite.
Hi @Dogukan It's good to hear that your problem is solved now. I moved my comment to the Answer section because it helped you t...

3 years ago | 0

Answered
Track a circular trajectory by solving a QP and using quadprog solver (using CLF approach)
Hi @Pallov Anand Sufficiently increasing the value of alpha reduces the tracking error between the x-y trajectory and the desi...

3 years ago | 0

Answered
Сan not identify block
Hello @Anton It is possible to create the block using "block mask" techniques. However, I think the authors probably (and simpl...

3 years ago | 2

| accepted

Answered
Error when simulating an adaptive control system with an inverse reference model: Derivative is not finite.
Hi @Anton There is no obvious division-by-zero component. So, the system must be unstable, which causes the output to grow out ...

3 years ago | 3

| accepted

Answered
Control vehicles velocity according to speed signs
@Purvil Patel, Here is th basic idea. Even though some speed limit signs maybe out of the sensor's range, the controller should...

3 years ago | 0

Answered
Plot the function sin (x) on the interval [0, 5]. Now generate the discrete time signal from the sine function with 6 discrete values. Using this fundamental period, generate
Hi @Woods, follow this example. fcn = @(x) 2*x - x.*abs(x); fplot(fcn, [-1 1]) grid on title({'Plot of $y = 2 x - x |x|$ ove...

3 years ago | 0

Answered
Solving coupled differential equations
Hi @Jon I'm unsure if the system has a general analytical solution. In Pure Math, from the properties of a stable 2nd-order OD...

3 years ago | 0

Answered
Warning: No rules fired for Output 1. Defuzzified output value set to its mean range value 0.5.
Hi @Verónica Valencia Valencia I can only explain why the "Warning" appears. Once you understand, try fixing the underlying roo...

3 years ago | 0

Answered
How to incorporate equations in the connect function for control design?
Hi @Jiten Parmar Thanks for clarifying that. For more info, you can find out how use 'connect' here. But I have seen people usi...

3 years ago | 1

| accepted

Answered
ode45 taking too long to solve set of ODEs.
Hi @H, A simple test shows that the code works with ode15s() solver, and it produces results. Take note: If the initial value...

3 years ago | 0

Answered
Error using FuzzyInferenceSystem/addRule Vector description: Rule length must be m+n+2, where m is the number of inputs and n is the number of outputs.
Hi @Verónica Valencia Valencia Change this line fis = mamfis('Name', 'myfis', 'NumInputs', 2, 'NumOutputs', 1); to fis = mam...

3 years ago | 1

| accepted

Answered
How to numerically solve system of equations and differential equations simultaneously?
Hi @I CHUN LIN It seems that simple Substitution-and-Elimination method produces the solution . Thus, the linear ODE becomes...

3 years ago | 2

Answered
Trouble plotting Second Order Equation
Hi @Nina It appears that you tried to simulate the undamped pendulum-like ODE with multiple initial angles. If I'm correct, th...

3 years ago | 1

| accepted

Answered
how to show only selective legend in the graph
Hi @AL On the basic, you can do this: x = linspace(-pi, pi, 3601); y1 = sin(x); y2 = cos(x); y3 = 1*(x); plot(x, [y1' y2'...

3 years ago | 2

| accepted

Answered
Unable to solve stiff differential equation
Hi @AJMIT KUMAR, It appears that the system is inherently unstable for . If you simulate the system for a longer time, then the...

3 years ago | 0

Answered
plotting transfer function / time domain version
Hi @Miller If you want to use the step(sys) function, then the sys must be a SISO or MIMO Linear System Model. In your case, i...

3 years ago | 0

Answered
Matlab Spring Damper models of Human Body Model
Hi @Phanindra Reddy Ravi There are some commercial realistic humans’ skeletal and muscle models developed by BoB Biomechanics. ...

3 years ago | 1

| accepted

Answered
Train a Siamese Network to Compare Images with image size [227 227 3]
You should be able to find this line in the tutorial: imageInputLayer([105 105 1],Normalization="none")

3 years ago | 0

Answered
Thermodynamic engine cycle and gas exchange simulation in ICE Engine
You can create the simulation model in MATLAB and Simulink, if you understand the mathematical model, or knowing how to make use...

3 years ago | 1

| accepted

Answered
Fuzzy Logic Toolbox - addRule throws "Do not use a rule keyword as a membership function name" error
Hi @Kartik Sahajpal Change the name of the fuzzy variable to "flowrate" (to eliminate the space). fis_size = mamfis; % Inpu...

3 years ago | 1

| accepted

Answered
Different Bode Plots from Same Function
Hi @Prithvi Nathan It seems that they are not exactly the same from the mathematical perspective. format long g estimated_n...

3 years ago | 0

Answered
How to generate a golden ratio graph in simulink
Hi @Ragavendra Joshi 18 Apr 2023 (Update): Here are the basic blocks in Simulink that you can use to create the Golden Ratio Sp...

3 years ago | 1

| accepted

Answered
build an augmented PID control model for a DC servo motor in Simulink
Hi @Tony Cheng I'm unfamiliar with your system, but the Augmented PID Control Scheme should look like the following diagram in ...

3 years ago | 1

| accepted

Answered
Error in using ode45 for solution of nonlinear system of three equations which are interlinked to each other
Hi @FAIZ UL HASSAN Try this: % Define the time-varying Disturbance D = @(t) sin(pi/10*t); % Define the scalar parameters ...

3 years ago | 0

Answered
how to add a state space representation with identifiable parameters into a Matlab function or a any block?
Hi @kawsar I'm unfamiliar with your system (probably something to do with the state of charge of an energy storage system). Ho...

3 years ago | 0

Load more