Answered
particle swarm optimization code to minimize cost function
Hi @REENA Regarding the particleswarm() solver, I believe you can define constraints using the Problem-Based Optimization appro...

2 years ago | 0

Answered
How would I plot this and then achieve minimum and maximum.
Hi @Tom The cubic function does not have global extrema, but it does have a local maximum point and a local minimum point. Are ...

2 years ago | 1

Answered
ode45 errorI have
Some corrections in the ODE function (ODAYRK1) Tol = 1e-12; Tol0 = 1e-9; tspan = [0 10]; options = odeset('RelTol',...

2 years ago | 0

Answered
Find zeropoints with interpolation
Hi @malik abdelli Check this out to see if this approach, using the zerocrossrate() function, is acceptable for finding the ind...

2 years ago | 1

Answered
Help With for loop with tranfer function and step
Hi @Davide Cannavacciuolo You probably want to plot like this: s = tf('s'); G = 1/(s^2 + 0.4*s + 0.1); K = [1 2 3 4 5 6]; ...

2 years ago | 0

| accepted

Answered
How to type sin function with square
@John Sanjai J, are you expecting this? syms x expr = sin(x)^2

2 years ago | 0

| accepted

Answered
What is the function to use to find the intersection of two graphs?
Hi @Lê It is possible to find intersections using the fsolve() command. f = @(x,y) y - 2 - (x.^2).*cos(x); fimplicit(f), grid...

2 years ago | 0

Answered
Solve ODE without initial condition
Hi @sudhir I also couldn't obtain the analytical solution using dsolve(). However, when I tested this problem on Wolfram Alpha,...

2 years ago | 0

Answered
inverse laplace transform from laplace transfer without using " ilaplace" instruction
Hi @Abdallah My integral skills get a little rusty due to over-relying on the Laplace transform look-up table. Anyhow, let's tr...

2 years ago | 1

Answered
Why my plot is wrong if I decrease dt
Hi @cindyawati cindyawati Please check if the differential equations and the initial values are enterer correctly or not. % Ca...

2 years ago | 0

| accepted

Answered
Why my - tf2sym - command is not working?
Hi @Enes Emre Öztürk, I guess you want to convert the transfer function to state-space nodel. Gs = tf(1, [1 10 27 18]) %% Me...

2 years ago | 0

Answered
How to use System Identification to estimate System Model with Process Variable (PV), Set Point (SP), and Output (OP) actual data over certain period?
Hi @Kiky Agustina Putri According to this article, a control system has three variables: the setpoint (SP), the process variabl...

2 years ago | 0

Answered
0% pwm output in pwm control of dc motor in fuzzy logic control
Hi @ser I've been contemplating the use of Mamdani FIS, particularly in the context of driving the PWM output from 0% to 100%, ...

2 years ago | 0

| accepted

Answered
Multiplying and finding inverse of a matrix.
Hi @Omar Just wanted to share the three methods I sometimes use to compute the matrix inverse. G = [0.3 0 -0.2 0; ...

2 years ago | 0

Answered
how to find intersect with 2 lines
Hi @JEEVITHA If you post like this, your question will likely be closed by the mods later. Please plot the circle and the recip...

2 years ago | 1

Answered
How can I draw graph of y^2=x^2 * (x+3)?
Hi @Lê The fimplicit() function can be used. f = @(x, y) y.^2 - (x.^2).*(x + 3); fimplicit(f), grid on xlabel('x'), ylabel('...

2 years ago | 1

| accepted

Answered
Error while using transfer function 'tf'
Hi @Keerthik Dhivya Please check if you have a user-defined function m-file with the same name as 'tf' that is saved in the cur...

2 years ago | 1

| accepted

Answered
I'd like to draw a graph of mechanical vibration with a matlap....
Hi @Hac Li Your teacher won't approve this code as it utilizes the MATLAB built-in ODE solver. However, you can compare the res...

2 years ago | 0

| accepted

Answered
Water Treatment Plant Modelling
Hi @hwee, @Vangala, & @Fernando Larraga I suggest that you refer to the definitive guide to water treatment engineering book in...

2 years ago | 3

Answered
How to build a model of Drone in Matlab Simulink?
Hi @Tris It is probably difficult to hire someone to model the drone. Your teacher most likely won't believe in your efforts or...

2 years ago | 0

Answered
ode45 function and solver errors for reactant conversion and temperature change
Hi @Maureen This should get the code running. Please edit the initial values as needed. If you are not very familiar with some ...

2 years ago | 0

| accepted

Answered
I want to make airfoil on Matlab..please tell me code of this
Hi @Aina Some aircraft instructors didn't teach the math behind drawing the airfoil. I had to dig up an old file to plot the NA...

2 years ago | 1

Answered
Optimization of Battery Design for a EV
Hi @Shardul I didn't watch the video. However, with the cost function, you apply the optimizer: fun = @costfun; x0 = 1; A ...

2 years ago | 0

Answered
Identifying Maximum Damping Factor and Frequency in Root Locus Plots
Hi @Chukwudalu, You can use the damp() command to find out the damping and frequency information. You can also use the looping ...

2 years ago | 0

Answered
dsolve problem got error
Hi @지웅 장 If dsolve() cannot return an analytical solution, then use ode45 solver to obtain a numerical solution. However, Wolf...

2 years ago | 0

Answered
Doubt in Coupled Ode
Hi @Susmita Panda Your 4th-order coupled system has two eigenvalues with positive real parts. Therefore, in theory, the state r...

2 years ago | 0

Answered
Setting a Specific Formula for PID Controller in Simulink (Matlab)
Hi @nora & @dorrin If you intend to use a PID controller to make the system behave similarly to the designed compensator, you'l...

2 years ago | 0

Answered
The main concern in this investigation to minimize the cost, volume and power loss of a BLDC motor
Hi @Debabrata Since you are an expert in BLDC motors, you should be able to write down relevant formulas in code. The syntax fo...

2 years ago | 0

Answered
How to convert time varying state matrix to ss ?
Hi @Savvas The ss() function accepts real- or complex-valued state-space matrices. Nowhere in the documentation does it mention...

2 years ago | 0

Answered
Using direct search and Bisection method to find roots above y=40.
Hi @Zainab I don't understand most part of your cluttered code and your code cannot find the roots. Thus, I have indicated chan...

2 years ago | 0

Load more