Answered
Solve system of equations graphically
Alternatively, you can also do like this: Solve or plot this polynomial: x = -2:0.01:2; y = x.^4 - 6; plot(x, y), gr...

3 years ago | 0

Answered
What block is hydraulic/liquid on/off valve in Simulink?
Hi @Busuyi 2nd Edit: Based on your sketch, it should be a Gate Valve. https://www.mathworks.com/help/hydro/ref/gatevalve.html...

3 years ago | 0

Answered
i need help to find impulse response of system h(t) at time t
Hi @Rushit Bhavsar I used the impulse() method. but you can try using the expm() method. Look up the example and verify with th...

3 years ago | 0

Answered
Does the fuzzy inference system (Mamdani) use Forward Chaining or Backward ?
Hi @Sarah IF you understand that the Fuzzy System provides means of reasoning by inference in order to decide the truthness of ...

3 years ago | 0

Answered
Can anybody give me the idea for implementing PID control for dc motor using state space equations through ode45 solver?
@MOHAMED ASWER Not sure how your DI/dc motor system, but I think the following example should give you the basic idea. tspan ...

3 years ago | 0

Answered
Find AIC, AICc, BIC for ODE system
Hi @TrevorR You can try using this command [aic, bic] = aicbic(). For more info, please check: https://www.mathworks.com/help/...

3 years ago | 0

Answered
How can I obtain the State space from the Mass,stiffness,damping matrices
Hi @aiman If the matrices are known, then you can apply these formulas: A = [zeros(n) eye(n); M\K M\C]; % to get the State...

3 years ago | 1

Answered
How to tune PID controller from time constant and static gain?
@Bruno Araujo, Not sure if you are looking for some manipulations like this: Kp = 72.402; Tp = 639.24; Gc = pid(Kp) Gf = tf(...

3 years ago | 0

Answered
Cost function to minimize variance of error
@Rishabh Pachchhao, Since you didn't provide info about your system. here is an example that you can study. However, I don't t...

3 years ago | 0

Answered
How to solve this equation
@Raef, you are a good son and took up a filial duty to help your father. n = 1; y0 = 1; % intial value F = @(t, y) - (1...

3 years ago | 2

| accepted

Answered
Can anyone help understand what the blocks in this figure are and where to find them in Simulink library?
Hi @Busuyi If you compare with the generic symbols in a Piping and Instrumentation Diagram (P&ID), they are manual-operated Gat...

3 years ago | 0

Answered
Find the local and global maxima and minima for the function (x+1)^2/(1+x^2) x belongs to [-5,5].Showing local min value something different than zero and how get local values
@Aashay, your code works. So, what exactly is the question for the math problem? syms x f(x)=(x+1)^2/(1+x^2); I=[-5,5]; fl(x...

3 years ago | 0

Answered
Fossen's dynamic AUV model implementation
Hi @John Terry You can follow a few examples on this link and apply the [V, S] = odeToVectorField(eqns) command. https://www.m...

3 years ago | 0

Answered
Solving a State Space Model using Runge Kutta method, Mid Point or Heun Method to view system response
Hi @Anas Rehman If you still keep the old versions of MATLAB (R2012 and older), you can find the requested ODE solvers in the l...

3 years ago | 0

Answered
Using fminsearch and then using the output of fminsearch in cost and ode function.
Maybe like this: [lambdas, cost] = fminsearch(@Q1_cost, -100) [interval, sol] = ode45(@Q1_ode, [0 10], [0.5 lambdas]); plot(i...

3 years ago | 1

| accepted

Answered
How can I obtain a equation from my fuzzy or ANFIS model done using tool box?
Hi @Lilly Mercy and @Tony Castillo Not sure if this simple example really answer the queries for a 5-input, 1-output system. He...

3 years ago | 1

Answered
having trouble optimizing a NPV
Hi @jxl The function tsk(r) seems to be converging asymptotically to zero as . r = linspace(0, 1000, 10001); plot(r, tsk(r)),...

3 years ago | 0

Answered
how to plot a periodic function fro negative to positive?
Hi @Daniel Niu Are you looking for this? Edit: Made changes as per shown in your diagram. Because the amplitude is unknown, th...

3 years ago | 1

Answered
How to plot function f(x,y,z)=c ?
@Duong Nguyen Not how it looks. Are you expecting something like this? c = pi/2; z = @(x, y) acos(c - cos(x) + cos(y)); fsur...

3 years ago | 0

Answered
I'm not getting the correct result for the u, i want it in degree but the ans is not right, the plot is not smooth.
To understand why it is not smooth, you need to see what causes the singularity (division-by-zero) at around . ni = 1; nt = 1....

3 years ago | 0

Answered
function that applies the parabolic interpolation method
Hi @Miftahul Jannah, Can you provide the parabolicmin.m file? help parabolicmin By the way, you should be able to visually de...

3 years ago | 1

| accepted

Answered
How to convert the following mathematica code to Matlab?
Hi @Md Fayaz Ahamed Identify the type of problem at first. If the problem is non-stiff, use ode45. Miscellaneous examples are p...

3 years ago | 0

Answered
How to find position function with acceleration function using matlab
Hi @ijsonvjksrefdsb This ordinary differential equation is a linear type. So, it is actually a kind of eigenvalue/eigenvector p...

3 years ago | 0

Answered
How do you design an adaptive PID controller/compensator for a Gimbal System? (taking in angle, accel, torque from reference)
Hi @Michael Ray Maligro If you asking how to design PID in MATLAB or Simulink, you need to have the mathematical model of the G...

3 years ago | 0

Answered
Determine the reward value to stop training in RL agent
Hi @Haitham M. There is an option to set the StopTrainingValue.

3 years ago | 0

Answered
State Variable of the Memristor
Hi @vani If you are talking about modeling the memristor and running a simulation in MATLAB, then I think you can use ode45(). ...

3 years ago | 1

| accepted

Answered
Problem with minimizing a LQR problem with Genetic Algorithm
Hi @gilad shaul To find through , you need to expand the Continuous-time Algebraic Riccati Equation (CARE) in terms of , and t...

3 years ago | 4

Answered
Calculating Value of Inverse function
Hi @Johan Ahlberg How about this? syms x f(x) = (x^2)/(1 + sqrt(x)); g = finverse(f) double(g(2))

3 years ago | 1

Answered
the curve in matlab
Hi @randino Not sure what you really want. Perhaps you want to get the "Validation" plot using the plotperform() command? x ...

3 years ago | 0

Answered
How to create a transfer function with no simplification ?
Hi @Dimosthenis Leonidas, The zpk() command shows the zero/pole/gain model. (), , and () are not in pole forms. If the native ...

3 years ago | 2

Load more