Answered
Simple Question: How to Plot a Function over an Interval (Details in Body)
Hi @Michael Meyne Alternatively, you can also use fplot() to symbolically plot the function over the specified interval for ....

3 years ago | 0

Answered
Where is the mistake in (x.^2-y.)^2?
Hi @Shelsyn, Either the dot was misplaced, or f1 = @(x, y) (x.^2 - y).^2; % <-- the dot is outside of the parentheses figure...

3 years ago | 1

Answered
How to convert linguistic variables into fuzzy values?
Hi @Najat Ali Khalifa The fuzzy membership functions for the linguistic variables VeryCold, Cold, Warm, Hot can be created usi...

3 years ago | 0

Answered
fmincon with handle function input
HI @giacomo, I'm unsure if this is what you want to minimize using fmincon(). This is just a simple example without constraints...

3 years ago | 3

| accepted

Answered
What is wrong with this code.
Hi @ZAINULABADIN ZAFAR Update: Thanks to @Walter Roberson for finding the source (PDF). The MATLAB functions stabilitaetsanalys...

3 years ago | 0

Answered
How to fix algebraic loop error in PV
Hi @Venkateshkumar Mohan The simulation terminated because an error occurred at the Product5 block at time 0.0 s. Please check...

3 years ago | 0

Answered
incorrect answer of (-8)^(-1/3)
Hi @Sen The answer is correct. Please find the detailed explanation by @Walter Roberson in this thread: https://www.mathworks....

3 years ago | 0

Answered
Problem with cubic root
nthroot(-1, 3)

3 years ago | 3

| accepted

Answered
how to get the correct plot of function sin(N+1)*pi*x^2/sin(pi*x)^2 with different N
Hi @Daniel Niu I checked using the limit() function. syms x N y = limit((sin((N + 1)*pi*x)^2)/(sin(pi*x)^2), x, 0) N = sym(9...

3 years ago | 0

Answered
Write a MATLAB code where I'll show the plot or graph.
Hi @AZ Sajjad This is a piecewise linear function because it is defined on a sequence of intervals, and there are a few ways to...

3 years ago | 0

Answered
Trying to create a phaseportriat of the Van der Pol oscilator (VPO).
Hi @Luc Sloan You can assign a parameter that allows the script to repeat over a number of times. n = 100; ...

3 years ago | 1

| accepted

Answered
How can I get "simple PID closed-loop controller" code for Matlab function for applying in simulink ?
@Rawaz Aziz, From the description of the problem, it seemed that you want a modified closed-loop controller like this: % pid co...

3 years ago | 0

Answered
2-order linear differential equation with paramaters
Hi @Antonino Roccaforte, I'm unfamiliar with your ODE, but I tested it with dsolve, and there are some results, and one of the...

3 years ago | 0

Answered
Dealing with transfer function in symbolic math toolbox.
Hi @Hamza Harbi In MATLAB, the transfer function is preferred to be modeled as a tf-class System Object, which is used for simu...

3 years ago | 1

Answered
Plotting trapezoids in one graph
Hi @davut The complementary trapezoid is different from the flipped trapezoid, and thus, they have different mathematical formu...

3 years ago | 1

Answered
how to make bode plot in simulink system
Hi @Kyungmin You can insert the Bode Plot block in the Simulink model and follow the steps described in this link for visualizi...

3 years ago | 0

| accepted

Answered
how to apply single controller to multiple systems
Hi @K Kalanithi Here is a relatively simple script demonstrating an example of how to plot all responses of multiple systems th...

3 years ago | 1

| accepted

Answered
Solve the Pendulum problem 2θ¨=-2sinθ-3θ˙
Hi @Nirupa If you are determined to learn solving differential equations using MATLAB, there are various examples in the follow...

3 years ago | 0

Answered
Writing functions f(x,y)
Hi @Kaleina For a static function, especially a function of two variables, this is how I systematically find the minimum point....

3 years ago | 2

Answered
How to automatically find the function that linearizes another function.
Hi @Federico Massimi Some instruments may respond nonlinearly when the measurement signal is out of the standard operating rang...

3 years ago | 1

| accepted

Answered
can i decide the RL agents actions
Hi @Sourabh I believe that it has something to do with the StopTrainingCriteria and StopTrainingValue options of your rlTrainin...

3 years ago | 0

Answered
Error using bell Derivative of state '1' in block 'afasm50b22/VSC Control1/VDC Regulator/PID Controller1/Integrator/Continuous/Integrator' at time 0.055735 is not finite. The
Hi @wael The primary error is most likely caused by a division-by-zero term occurring when one of the state variables approache...

3 years ago | 0

Answered
what is the code for plotting the differential equation w.r.t. a particular parameter not w.r.t. time. help please?
Hi @ZAHID YOUSUF If you are familiar with second-order systems like the harmonic oscillator, here is an example that shows a 3-...

3 years ago | 1

| accepted

Answered
Plotting system outputs together with different time intervals for each system? HELP!
The lsim() function offers better control than the step() function. t = 0:0.001:15; Ts = [1 2 3 4 5]; w = 4./Ts; for j = 1...

3 years ago | 0

Answered
Problem related with "odeToVectorField"
I don't see any symbolic differential variables in these three so-called ODEs. That's why odeToVectorField() threw the error mes...

3 years ago | 0

Answered
How to get a view of Membership function in Fuzzy logic ??
Instead of printing the screen to create a screenshot of the membership functions (MFs), you can use the function plotmf() to pl...

3 years ago | 0

Answered
How to model PID flow control with throttling (butterfly) valve in wells turbine in owc?
Hi @Rania Modeling in MATLAB generally requires a good understanding of the system that you intend to control. Start by develop...

3 years ago | 0

Answered
Reinforcement Learning algorithm to tune PID parameters of a system
Hi @Bipratip, I didn't check everything, but I noticed that you reused the same quadratic cost function (Reward in RL terms) fr...

3 years ago | 0

Answered
Problem using tf to perform a transfer function.
Hi @Leaysia Lampkin If you are unable to obtain the Control System Toolbox, many useful MATLAB-compatible functions can still b...

3 years ago | 1

Answered
Please help me find a PID controller coefficient
Assuming the Ideal form: The PID controller in MATLAB takes the practical form , where represents the time constant of the de...

3 years ago | 0

Load more