Answered
How i can talk to support of Matlab website?
Hi @salim saeed I would like to add that when you share your scripts, code, models, or graphics, you grant forum users the righ...

19 dagen ago | 1

| accepted

Answered
Rotary Inverted Pendulum State Space Model PID Control
Hi @Burak Mert If no other control requirements are specified, the objective is to "freely" find any combination of gain values...

19 dagen ago | 0

Answered
Evolutionary learning tools or aids
If you are looking for a built-in function for optimizing solutions based on learning principles inspired by biological evolutio...

19 dagen ago | 0

Answered
Step response is not showing up in the legend of my plot
I tried plotting both to display on the same graph and inserted the legends. There's no problems so far. legend('simulated', 'e...

20 dagen ago | 0

Answered
Fit a standard exponential fit to approximate data
Hi @Reji G You can use the approach described by @William Rose. Alternatively, you can use the envelope() function. The followi...

27 dagen ago | 1

Answered
minimizing with genetic algorithm
Hey @dal For time-invariant real-valued univariate functions, it is recommended to plot the graph to estimate the approximate l...

2 maanden ago | 0

Answered
When plotting functions like 1/sin(x), how can I remove the vertical lines at the points of discontinuity?
Use fplot(). fplot(@(x) 1./sind(x), [-359 359]), grid on, xlabel('degree') % d = -345:30:345; % x = deg2rad(d); % y = ...

2 maanden ago | 0

Answered
how do divide like this picture by code matlab?
Hi @Vuong If this is a topic of Finite Element Analysis, then look up generateMesh() and pdemesh(). gm = fegeometry(@lshapeg);...

2 maanden ago | 0

Answered
Have successfully used ode45 once in this code, but with the same size parameters am getting an error about initial conditions vector being longer than the return vector.
Hi @Raoul There is no error in organizing the code structure clearly with constants and states (variables that change over time...

2 maanden ago | 0

Answered
Controllable Companion form for a MIMO system
Hi @naiva saeedia The following is the result returned by compreal: %% Original state-space Plant A = [-0.978707531551846 ...

3 maanden ago | 0

Answered
Initial Oscillations in Closed Loop Control Model
Hi @Mariangela Plot the vector field, and you should be able to understand the instantaneous dynamics at each point in the phas...

3 maanden ago | 0

Answered
PID tuning to meet conditions for settling time and overshoot while a stable system with minimum peak time and zero velocity error.
Hi @Ashaya KC Here is the solution using pidtune(). There is no direct way to input the desired settling time and overshoot per...

3 maanden ago | 0

| accepted

Answered
PID tuning to meet conditions for settling time and overshoot while a stable system with minimum peak time and zero velocity error.
Hi @Ashaya KC Let's first use the ideal mathematical solution and then compare it to your solution obtained using the pidtune()...

3 maanden ago | 0

Answered
having problem plotting ramp function
Hi @Tien Yin The signal in the image is a piecewise function that consists of three sub-functions defined over different interv...

3 maanden ago | 1

Answered
How to add an s+1 block on simulink?
Hi @Julian Since you are unable to clearly define the control objective and performance requirements, I can only advise you to ...

3 maanden ago | 0

Answered
Optimization Eigenvalue problem Stiffness matrix
Hi @Marina The problem has two parts. I have solved only the first part for you, which is to determine the characteristic polyn...

4 maanden ago | 0

Answered
Turning powers of hyperbolic functions to multiple arguments
Hi @Andrew At first, I thought you were describing the sum of arguments. This is certainly not a silly question. However, it re...

4 maanden ago | 1

Answered
how can I calculate euler constant
Hi @hajer Three days ago, @John D'Errico and I discussed the Gamma function in this thread. I’m not sure how to perform the num...

4 maanden ago | 2

Answered
make the execution faster
Hi @prabal datta You might as well use the built-in ODE solver, such as ode45, to solve the chaotic Lorenz system for compariso...

4 maanden ago | 1

Answered
The Newton Raphson method for p(x) = 100 .* sqrt(x) .* 0.99.^(sqrt(x)) - 0.5 .* x, problem with derivative and reasonable x value
Hi @Elina You likely want to find the value of where the maximum value of occurs, but you may have inadvertently used the New...

4 maanden ago | 0

Answered
finding altitude using matlab atmosisa given pressure
Hi @Irfan You can use this minimization approach. altitude = ga(@costfun, 1, [], [], [], [], 3.9e3, 4e3) %% Check result [~,...

4 maanden ago | 0

| accepted

Answered
PID controller behaves strangely for larger Ts values
Hi @Wynand There are a few things for which you can find detailed explanations in control theory books. In short, the ideal ITA...

4 maanden ago | 1

Answered
How do I solve this differential equation?
Put the constants inside the function. tspan = [0, 1e-3]; y0 = [0.139626; 0]; [t, y] = ode45(@(t,y) odefcn(t,y), tspa...

4 maanden ago | 1

| accepted

Answered
How to do this block diagram in simulink?
Hi @Tahsin If you are referring to this block diagram, there is a slight mistake in the architecture, as the Velocity Loop and ...

4 maanden ago | 0

Answered
How to properly fit the data to lorentzian curve as I am getting a few errors...
Hi @Yogesh Here is the fitting with a Gaussian model. RMS=[]; R=[]; P_threshold=[]; L=5; %[m] Fiber length V1=[1]; P0=4.7...

4 maanden ago | 0

Answered
PI controller does not have the effect I would expect from the calculations
Hi @Wynand Please see my explanations below. %% Plant K = 11041666; B = 100; M = 1019; num ...

4 maanden ago | 0

| accepted

Answered
What calculation is done to find the gains (k) of the zpk function?
Hi @Rafaella Barrêto Campos Short Answer: Due to your specific state-space configuration, k(1) is derived from the first elem...

4 maanden ago | 0

Answered
Model and control state space with perturbation
Hi @CN. The discussion in the provided link does not address control design for disturbance rejection. Regarding your inquiry,...

4 maanden ago | 0

Answered
Trying to create a polynomial using data from a table
Hi @Andrei I believe the correct syntax should be [X, Y] = meshgrid(dP, PressureInlet), and the remainder of your code appears ...

4 maanden ago | 0

Answered
What optimization algorithm would work best for my network problem?
Hi @Robert Gray It may be difficult to determine which optimization algorithm would work best for your network problem. Some op...

4 maanden ago | 0

Load more