# Sam Chak

**Statistics**

**MATLAB Answers**

**0** Questions

**761** Answers

RANK**92**

of 271 616

REPUTATION**1 432**

CONTRIBUTIONS

**0** Questions

**761** Answers

ANSWER ACCEPTANCE **
0.00%
**

VOTES RECEIVED**167**

RANK

of 18 319

REPUTATION**N/A**

AVERAGE RATING**0.00**

CONTRIBUTIONS**0** Files

DOWNLOADS **0**

ALL TIME DOWNLOADS**0**

RANK

of 120 179

CONTRIBUTIONS

**0** Problems

**0** Solutions

SCORE**0**

NUMBER OF BADGES**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

'Matlab says that the problem is at (t), i want to use ode45

Hi @Eleftherios Guess you probably want to view the Lorenz attractor. [t, x] = ode45(@odefun, [0 100], [1 1 1]); plot3(x(:,1)...

ungefär 7 timmar ago | 0

Matlab R2022a: How to obtain the predicted values given the training and test observations with the neuro-fuzzy method?

Hi @jamal numan "data" was in your evalfis() but the one in the Workspace is "Data". Also, the syntax is now because Input arg...

ungefär 16 timmar ago | 1

| accepted

MATLAB doesn't plot my function

Hi @Pedro Almeida You probably want to plot like this? y = @(x) - sin(x); z = @(x) x.^2; fun = @(x) y(x) - z(x); ...

en dag ago | 2

Comparisons of numerical solution methods

Hi @Enrico Incardona, Here is the comparison between the solution by ode45 and the solution by Forward_Euler. As mentioned pre...

en dag ago | 0

Error using fmincon Supplied objective function must return a scalar value

HI @SWASTIK SAHOO The error message says that your objective function "myfunc()" must return a scalar value. Perhaps the trapz(...

en dag ago | 0

| accepted

Second order differential equation with large matrices

Hi @David Togonidze SInce this is a linear system, if you have the Control System Toolbox, then you can manipulate the matrix d...

2 dagar ago | 2

| accepted

Control System Steady State Error for VTOL

Hi @Abdul Rahman Alam The transfer function between the error signal and the input signal is defined by where is the clos...

2 dagar ago | 1

| accepted

How can i calculate the PI controller gains from my plant transfer function

Hi @Mads Olesen You can try this. But use a small combination pool. From the previous simulations, it seems that Kp has a mor...

3 dagar ago | 0

Inputting a time varying equation into system in simulink

Hi @Reed Smith Edit #2: As suggested in my original Answer, you can use the Clock to generated the time t vector, so that you c...

3 dagar ago | 1

| accepted

differential equations matlab with 2 equations with changing values dependent on each other

Hi @Brennah Not exactly sure what to do dxe2 = diff(dxe). But from the given ODEs, they can be solved to obtain and . You can...

5 dagar ago | 0

how to derivate an equation of x and y without taking any variable constant?

Hi @Ahmed Mujtaba It can be confusing because the math structure of y/1 - x - cos(y) is legitimately interpreted as . Guess y...

5 dagar ago | 0

Halley's method

Hi @Vivian Ho It is recommended to show your working and efforts in solving the problem. But if you are having trouble, then yo...

6 dagar ago | 0

How to use the matlab to predict the properties price given some observations using fuzzy logic (FL)?

Hi @jamal numan Generally, you need to collect data about the past and current state of the Property Prices in a region and its...

6 dagar ago | 1

Lyapunov stability analysis function

Hi @Lydia Abigail Garza Coello As far as I know, there is no built-in function.m in MATLAB for directly performing the Lyapunov...

6 dagar ago | 0

| accepted

How to identify negative slope from plot data?

Hi @Michael Tognotti This is just a basic idea for identifying the region of negative slope. Generally, the numerical different...

6 dagar ago | 0

How can i calculate the PI controller gains from my plant transfer function

Hi @Mads Olesen Perhaps you can directly insert the PI controller and obtain the closed-loop response. Tune the gains if not go...

7 dagar ago | 1

| accepted

Derivative of state '3' is not finite.

Hi @younwook song The system is unstable. It is rather difficult to decipher the dynamics from the displayed block diagram and ...

7 dagar ago | 0

I want help solving differential equations

Hi @kubel Follow the example in the dsolve() documentation https://www.mathworks.com/help/symbolic/dsolve.html syms x(t) eq...

7 dagar ago | 0

| accepted

Plot several solution curves to y'(t) = y(t) - t

Hi @Carla Roos You can create an anonymous function of t and y. fun = @(t, y) y - t; % <--- Type like this % solve f...

7 dagar ago | 0

| accepted

How to import my state space Modell into Simulink

Hi @Ann-Christin Schlupek You will need to import the identified model from the MATLAB workspace into Simulink. Follow the step...

8 dagar ago | 0

Closed-loop parameters identification

Hi @Andrea Carlo Giorgio Gottardini I see. You need the mathematical model to perform tuning on the PID. Since the Simulink mod...

8 dagar ago | 0

is there any way to train a model to learn a matrix and all variables in it then generate same matrix

Hi @hessam asadi The answer is generally yes, it is possible to train so long as it is a non-singular (invertible) matrix. Fir...

8 dagar ago | 0

Why the controller block diagram is not working (while tracking the reference and water level in tank 2 at specific level)?

Hi @Sana Mohamed It seems that your equation for causes the level of Tank #2 to dip below 0, thus term sqrt(x(2)) returns an ...

8 dagar ago | 0

defining state matrix as anonymous function

Hi @Nicole The input should be defined for in order for the anonymous function to work properly in MATLAB. % parameters m ...

8 dagar ago | 0

2-DOF Damped Unforced System. Finding Natural Frequences/Damping ratios. Receptance Matrix.

Hi @Nikolaj Gatijatullin I don't have sufficient knowledge about System 2 (2-DOF). If you can show how you normally use Mathema...

10 dagar ago | 0

Plot step response for control signal (u1 u2 ...) in a MIMO system with feedback

Hi @Cesar Adolfo Cruz Vargaya The original plant is a coupled 2nd-order MIMO system. If the desired closed-loop transfer functi...

11 dagar ago | 0

PID implementation using code

Hi @Sanjeet Kulkarni Wouldn't it be simpler if you obtain the signal directly from the Integrator block, and then feed it into...

13 dagar ago | 0

Optimizing simulink parameters from matlab code

Hi @Jasmin Falconer Put it another way around, you can fminunc() to directly optimize the gains from the Simulink model and th...

13 dagar ago | 0

conversion from fmincom to NSGA -II

Hi @basit mujtaba If you have written your own NSGA-II algorithm in a MALTAB function file, for example, called nsga2.m, then y...

13 dagar ago | 0

Find likelihood from state space with Kalman filter

Hi @Rob Perhaps you are looking for the likelihood() function. help likelihood

13 dagar ago | 0

| accepted