Answered

the responses of 2d systems

You can create descriptor state-space systems with dss function and then plot results with stepplot or intial functions.

the responses of 2d systems

You can create descriptor state-space systems with dss function and then plot results with stepplot or intial functions.

5 months ago | 0

Answered

Solve ill-condition matrix

Does it display this warning but still solve the equation ? How are the results ? You can also try : x = A\B . It solves the sy...

Solve ill-condition matrix

Does it display this warning but still solve the equation ? How are the results ? You can also try : x = A\B . It solves the sy...

6 months ago | 0

Answered

How do you extract the state space model from ssest()?

sys1 is a discrete-time state space model. If you want to compare the results with sys2, replace your code with: %% Extract th...

How do you extract the state space model from ssest()?

sys1 is a discrete-time state space model. If you want to compare the results with sys2, replace your code with: %% Extract th...

7 months ago | 1

| accepted

Answered

Tolerance, correct digits

If the tolerane is 5E5 what does it actually means ? It depends... Can you provide the code ? And a little context so that w...

Tolerance, correct digits

If the tolerane is 5E5 what does it actually means ? It depends... Can you provide the code ? And a little context so that w...

8 months ago | 0

Answered

Can i get a value of ρ with matlab?

Do you have symbolic tooblox ? If yes, you can have a look here: https://fr.mathworks.com/matlabcentral/answers/46003-solving-...

Can i get a value of ρ with matlab?

Do you have symbolic tooblox ? If yes, you can have a look here: https://fr.mathworks.com/matlabcentral/answers/46003-solving-...

9 months ago | 0

| accepted

Answered

How can i replace the value of A(x) in the function defined in "f1"...

You can have a look here to know how to create if / else conditions: https://mathworks.com/help/matlab/ref/if.html Then you sh...

How can i replace the value of A(x) in the function defined in "f1"...

You can have a look here to know how to create if / else conditions: https://mathworks.com/help/matlab/ref/if.html Then you sh...

9 months ago | 0

Answered

Unrecognized function or variable x

As the error message says, the variable 'x' is not declared before it is used line 7. How do you execute this function ? Is i...

Unrecognized function or variable x

As the error message says, the variable 'x' is not declared before it is used line 7. How do you execute this function ? Is i...

10 months ago | 0

Answered

MIMO control system with marginally stable poles at the origin

How do you test the pole zero locations ? Here, you have a pole equal to 0.

MIMO control system with marginally stable poles at the origin

How do you test the pole zero locations ? Here, you have a pole equal to 0.

10 months ago | 0

Answered

Determine suitable control gain for the controller

Well, this is a vague question... To tune the gain you either need a model of your system and do some calculations, or if you d...

Determine suitable control gain for the controller

Well, this is a vague question... To tune the gain you either need a model of your system and do some calculations, or if you d...

11 months ago | 0

Answered

How to save indices of a certain region of a matrix

I am not sure if I understood your question but here is a second simple example: A = [10 11 12;13 14 15; 16 17 18]; B = [14 15...

How to save indices of a certain region of a matrix

I am not sure if I understood your question but here is a second simple example: A = [10 11 12;13 14 15; 16 17 18]; B = [14 15...

11 months ago | 0

| accepted

Answered

i would like to create a randi function that will allow me to generate two arguments at one

Suppose you have a n by n matrix: n = 5; T = magic(n); You can access a random cell in this matrix by using: c = randi(n,[1,...

i would like to create a randi function that will allow me to generate two arguments at one

Suppose you have a n by n matrix: n = 5; T = magic(n); You can access a random cell in this matrix by using: c = randi(n,[1,...

11 months ago | 0

| accepted

Answered

MATLAB R2019A

Here: https://www.mathworks.com/pricing-licensing.html?prodcode=ML&intendeduse=student

MATLAB R2019A

Here: https://www.mathworks.com/pricing-licensing.html?prodcode=ML&intendeduse=student

11 months ago | 0

Answered

i m getting 'subscript assignment dimension mismatch' in my code in 'line 18'

You have a problem of dimensions at line 18: pilotdata(p,J)=Mod(p,k); At the first iteration, it holds: p = 1,...

i m getting 'subscript assignment dimension mismatch' in my code in 'line 18'

You have a problem of dimensions at line 18: pilotdata(p,J)=Mod(p,k); At the first iteration, it holds: p = 1,...

11 months ago | 0

| accepted

Answered

Constrained Global Optimization Problem with MultiStart, GA and HybridFunction using Parallel Processing whithout Ste

Update your code like this: A=rand(2,2); B=[1 ;0]; n = length (A); Com = B; for x = 1: n-1 Com = [Com, (A ^ (x)) * B]...

Constrained Global Optimization Problem with MultiStart, GA and HybridFunction using Parallel Processing whithout Ste

Update your code like this: A=rand(2,2); B=[1 ;0]; n = length (A); Com = B; for x = 1: n-1 Com = [Com, (A ^ (x)) * B]...

11 months ago | 1

Answered

How can I work on a valuable name with a minus sign in it...?

From this documentation: https://mathworks.com/help/matlab/matlab_prog/variable-names.html "valid variable name starts with a ...

How can I work on a valuable name with a minus sign in it...?

From this documentation: https://mathworks.com/help/matlab/matlab_prog/variable-names.html "valid variable name starts with a ...

11 months ago | 1

| accepted

Answered

I don't get the correct output from my function

When you change from -5 to -10, the absissa of the plots change, yes. But the value of the function does not change. What makes ...

I don't get the correct output from my function

When you change from -5 to -10, the absissa of the plots change, yes. But the value of the function does not change. What makes ...

11 months ago | 0

Answered

How do I get my function to return a numerical value?

The function HW5VJ0 returns a function handle. To get a numerical value, you have to call it with the specified value of x: x =...

How do I get my function to return a numerical value?

The function HW5VJ0 returns a function handle. To get a numerical value, you have to call it with the specified value of x: x =...

11 months ago | 0

| accepted

Answered

How to make a 3D plot of 41x41x41 datapoints

You can have a look here to see different solutions to plot data in 3D: https://mathworks.com/help/matlab/visualize/creating-3-...

How to make a 3D plot of 41x41x41 datapoints

You can have a look here to see different solutions to plot data in 3D: https://mathworks.com/help/matlab/visualize/creating-3-...

11 months ago | 0

Answered

I want to apply bubble sort

bubblesort is defined such that it takes only one input (the table to sort). And you call it with two inputs : A=bubbleSort(A,9...

I want to apply bubble sort

bubblesort is defined such that it takes only one input (the table to sort). And you call it with two inputs : A=bubbleSort(A,9...

1 year ago | 0

| accepted

Answered

Obtaining result from a previous point

Have a look here: https://mathworks.com/help/matlab/matlab_prog/loop-control-statements.html https://mathworks.com/help/matlab...

Obtaining result from a previous point

Have a look here: https://mathworks.com/help/matlab/matlab_prog/loop-control-statements.html https://mathworks.com/help/matlab...

1 year ago | 0

| accepted

Answered

symbolic system of equation

First problems on lines 2 to 4: gamma=sym(zeros(i,1)); w=sym(zeros(i,1)); l=sym(zeros(i,1)); i is not yet defined.

symbolic system of equation

First problems on lines 2 to 4: gamma=sym(zeros(i,1)); w=sym(zeros(i,1)); l=sym(zeros(i,1)); i is not yet defined.

1 year ago | 0

Answered

What is the difference between the fixed point and floating point modeling in simulink ?

Have a look at these documentations : https://mathworks.com/help/comm/ug/floating-point-and-fixed-point-data-types.html https:...

What is the difference between the fixed point and floating point modeling in simulink ?

Have a look at these documentations : https://mathworks.com/help/comm/ug/floating-point-and-fixed-point-data-types.html https:...

1 year ago | 1

Answered

select from matrix!

When executing the command it outputs : b = 3 2 2 1 The command : b= [a(1,2:3);a(2,1:2)] sel...

select from matrix!

When executing the command it outputs : b = 3 2 2 1 The command : b= [a(1,2:3);a(2,1:2)] sel...

1 year ago | 1

| accepted

Answered

plot standard deviation as a shaded area

You can use the code directly from this answer: https://mathworks.com/matlabcentral/answers/180829-shade-area-between-graphs#an...

plot standard deviation as a shaded area

You can use the code directly from this answer: https://mathworks.com/matlabcentral/answers/180829-shade-area-between-graphs#an...

1 year ago | 3

Answered

How to make a array from a loop?

You can do something like: nb = 1440; j = zeros(1,nb); Z = zeros(1,nb); for i = 1 : nb Z(i) = powerConsumption(i) - sol...

How to make a array from a loop?

You can do something like: nb = 1440; j = zeros(1,nb); Z = zeros(1,nb); for i = 1 : nb Z(i) = powerConsumption(i) - sol...

1 year ago | 0

Answered

System unit-impulse response for given tau

There is a problem of dimensions for matrix multiplication at line 5 and 6 : x1 = (A/tau1)*exp(t/-tau1) x2 = (A/tau2)*exp(t/-t...

System unit-impulse response for given tau

There is a problem of dimensions for matrix multiplication at line 5 and 6 : x1 = (A/tau1)*exp(t/-tau1) x2 = (A/tau2)*exp(t/-t...

1 year ago | 0

Answered

When we use the ";" at the end of a command line and when we do not use it

From https://www.tutorialspoint.com/matlab/matlab_syntax.htm : Semicolon (;) indicates end of statement. However, if you want t...

When we use the ";" at the end of a command line and when we do not use it

From https://www.tutorialspoint.com/matlab/matlab_syntax.htm : Semicolon (;) indicates end of statement. However, if you want t...

1 year ago | 0

Answered

adding element to a matrix row

You can read this to know about matrix indexing: https://www.mathworks.com/company/newsletters/articles/matrix-indexing-in-matl...

adding element to a matrix row

You can read this to know about matrix indexing: https://www.mathworks.com/company/newsletters/articles/matrix-indexing-in-matl...

1 year ago | 0

| accepted

Answered

Control of inverted pendulum

I don't find anything similar in literature LQR algorithm with state estimator is very common and you can find plenty of exampl...

Control of inverted pendulum

I don't find anything similar in literature LQR algorithm with state estimator is very common and you can find plenty of exampl...

1 year ago | 0

Answered

Find elements in a matrix

You can get the indices with: idx = A >= 30 & A <= 65 To know the number of values corresponding to the condition: numel(find...

Find elements in a matrix

You can get the indices with: idx = A >= 30 & A <= 65 To know the number of values corresponding to the condition: numel(find...

1 year ago | 0