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

casi 4 años hace | 0

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

casi 4 años hace | 0

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

casi 4 años hace | 0

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

casi 4 años hace | 1

| aceptada

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

casi 4 años hace | 1

Respondida
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)),...

casi 4 años hace | 0

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

casi 4 años hace | 1

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

casi 4 años hace | 0

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

casi 4 años hace | 0

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

casi 4 años hace | 1

| aceptada

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

casi 4 años hace | 0

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

casi 4 años hace | 0

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

casi 4 años hace | 0

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

casi 4 años hace | 0

Respondida
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(). ...

casi 4 años hace | 1

| aceptada

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

casi 4 años hace | 4

Respondida
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))

casi 4 años hace | 1

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

casi 4 años hace | 0

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

casi 4 años hace | 2

Respondida
Problem with minimizing a LQR problem with Genetic Algorithm
Hi @gilad shaul Minimizing the norm(P) does not work because there are infinite K that can make A'*P + P*A - K'*R*K + Q exactly...

casi 4 años hace | 3

| aceptada

Respondida
Hello, I am trying to numerically solve the following differential equation but unable to get a solution.
Hi @David M, If you are looking for a numerical solution, then the ode45() command is used. No = 1; So = 0.9999; ga...

casi 4 años hace | 0

Respondida
cantilever beam matlab equation solve
Hi @영범 곽 The function seems to have no real roots. Please check the trigonometric function again if something is missed. k = 2...

casi 4 años hace | 1

| aceptada

Respondida
How do you appropriately integrate time steps to a while loop program for a single stage model rocket?
Your code runs, but I suspect that something is wrong in your Rocket Model. Does the line return the pitch angle in degree or r...

casi 4 años hace | 1

| aceptada

Respondida
Unrecognized function or variable
Hi @Aysel Alimirzayeva It requires Robust Control Toolbox, the function is introduced in R2020a. Since yours is R2019b, then I ...

casi 4 años hace | 1

| aceptada

Respondida
MatLab codes for the used by forensics to determine the exact time of death.
Hi @Evalistus Simon The equation derived from Newton's Law of Cooling is given by The ambient temperature is 70°F. Suppose t...

casi 4 años hace | 2

Respondida
Write MATLAB code to solve the following the minimum problem.
Hi @Chihiro Ogino You are advised to do some reading on the PSO algorithm to understand the code. % Step 1: Initialize PSO Xm...

casi 4 años hace | 1

| aceptada

Respondida
L’Hospital’s rule
Probably more clearly for you if you insert the expression directly syms x limit((x + 2)/(x^2 + 3*x + 2), -2)

casi 4 años hace | 1

Respondida
Help me drawing graph
Hi @현범 장 Here there is fimplicit(@(x,y) x + y - 5)

casi 4 años hace | 1

| aceptada

Respondida
ode45 giving incorrect result
Hi @Joseph Billips There were errors in your code when you attempt to describe the dynamics of the pendulum, which is a 2nd-ord...

casi 4 años hace | 0

Respondida
Modelling ODE in Simulink when input multiplied by ouput
Hi @aizo zeo The given ODE cannot be modeled in the Laplace transform sense because it is a non-affine system due to the produc...

casi 4 años hace | 0

Cargar más