Answered

How to assign an equation built by string to parameter c in nonlinear inequality constraint function for fmincon?

I don't think the approach you are following is worth pursuing further. Please see https://www.mathworks.com/help/optim/ug/pass...

How to assign an equation built by string to parameter c in nonlinear inequality constraint function for fmincon?

I don't think the approach you are following is worth pursuing further. Please see https://www.mathworks.com/help/optim/ug/pass...

alrededor de 1 hora ago | 0

Answered

how to generate a random vector with fixed sum and bounded elements

Maybe I am not understanding something, but it seems like your problem is overconstrained. You can easily make a length n vecto...

how to generate a random vector with fixed sum and bounded elements

Maybe I am not understanding something, but it seems like your problem is overconstrained. You can easily make a length n vecto...

alrededor de 19 horas ago | 0

| accepted

Answered

Programming and Coding for Beginners

I would strongly recommend first completing the MATLAB On Ramp. This will give you a quick general immersion in using MATLAB. La...

Programming and Coding for Beginners

I would strongly recommend first completing the MATLAB On Ramp. This will give you a quick general immersion in using MATLAB. La...

alrededor de 21 horas ago | 0

Answered

Matlab "Index in position 1 is invalid. Array indices must be positive integers or logical values."

The error is telling you that MATLAB thinks that the variable that you call maximum is a vector, and that you want to have eleme...

Matlab "Index in position 1 is invalid. Array indices must be positive integers or logical values."

The error is telling you that MATLAB thinks that the variable that you call maximum is a vector, and that you want to have eleme...

alrededor de 23 horas ago | 0

Answered

Faster/Simpler way to update my data in a table

Here's an approach that I think does what you want. You would have to benchmark the run time, but the approach is quite vectori...

Faster/Simpler way to update my data in a table

Here's an approach that I think does what you want. You would have to benchmark the run time, but the approach is quite vectori...

alrededor de 24 horas ago | 1

Answered

detecting the diagonal squares that includes only zero values

I think this may be do what you want, or if not is close enough that you can modify it from here. The function emptyBoxes ret...

detecting the diagonal squares that includes only zero values

I think this may be do what you want, or if not is close enough that you can modify it from here. The function emptyBoxes ret...

2 días ago | 0

Answered

Kinetic equation, R=R∞{1-exp(-Kt)}

It sounds like you may not be too familiar with using MATLAB at all. If you need to get going quickly at using MATLAB I would h...

Kinetic equation, R=R∞{1-exp(-Kt)}

It sounds like you may not be too familiar with using MATLAB at all. If you need to get going quickly at using MATLAB I would h...

2 días ago | 0

Answered

How to find settling time?

Here's a rough approach you might try. This code will not do the very last epoch, you could further modify to handle this spec...

How to find settling time?

Here's a rough approach you might try. This code will not do the very last epoch, you could further modify to handle this spec...

2 días ago | 0

Answered

How to handle timer

You probably have some error in the code, PlotImage, that the timer is calling. Debugging problems in timer functions is a litt...

How to handle timer

You probably have some error in the code, PlotImage, that the timer is calling. Debugging problems in timer functions is a litt...

2 días ago | 0

Answered

Not enough input arguments

The 'Not enough input arguments' error message means that when you call the function foc_cia you are not providing the correct n...

Not enough input arguments

The 'Not enough input arguments' error message means that when you call the function foc_cia you are not providing the correct n...

2 días ago | 0

Answered

How can I seperate these number from a cell and put it into a matrix.

You will not be able to put your data from the cell array you show to a matrix because you have both numeric and non-numeric dat...

How can I seperate these number from a cell and put it into a matrix.

You will not be able to put your data from the cell array you show to a matrix because you have both numeric and non-numeric dat...

5 días ago | 0

Answered

Error, array indices must be positive integers or logical values

In your code Df is a 2 by 200 matrix not a function. It therefore does not make sense in the last line of your code to have the ...

Error, array indices must be positive integers or logical values

In your code Df is a 2 by 200 matrix not a function. It therefore does not make sense in the last line of your code to have the ...

5 días ago | 0

| accepted

Answered

Negative Eigenvalues found in 12x12 Matrix

I would trust the result of the eig function. If you do not think your matrix, cor, should have negative eigenvalues, then you ...

Negative Eigenvalues found in 12x12 Matrix

I would trust the result of the eig function. If you do not think your matrix, cor, should have negative eigenvalues, then you ...

5 días ago | 0

Answered

How to solve this error "Not enough input arguments."

Your function requires 4 input arguments. You must have called it with less than 4 input arguments. Please check your code where...

How to solve this error "Not enough input arguments."

Your function requires 4 input arguments. You must have called it with less than 4 input arguments. Please check your code where...

5 días ago | 0

| accepted

Answered

I cant solve linear programming

It is of course possible to have a linear programming problem that is unbounded. This happens if there are no constraints that p...

I cant solve linear programming

It is of course possible to have a linear programming problem that is unbounded. This happens if there are no constraints that p...

5 días ago | 0

Answered

How to write a for loop that creates a vector of [1:1000, 1001:2000,....,n]

Just to make Geoff's suggestion more concrete, suppose you had a length 100000 vector of data points. You could put this into a ...

How to write a for loop that creates a vector of [1:1000, 1001:2000,....,n]

Just to make Geoff's suggestion more concrete, suppose you had a length 100000 vector of data points. You could put this into a ...

6 días ago | 0

Answered

the meaning of basic matlab words

Are you familiar at all with "Object Oriented Programming" this is a general approach to software development used in many compu...

the meaning of basic matlab words

Are you familiar at all with "Object Oriented Programming" this is a general approach to software development used in many compu...

6 días ago | 0

Answered

How to only plot the better result from a loop of 48 iterations in a convergence plot?

You could do something like this, assuming that your output is in vector y and iteration number is in vector iterCount plot(ite...

How to only plot the better result from a loop of 48 iterations in a convergence plot?

You could do something like this, assuming that your output is in vector y and iteration number is in vector iterCount plot(ite...

6 días ago | 1

Answered

How to find the intersection point by plotting the red line like below?

Assuming you have the water level in a vector, lets call it h, along with the values of pExceed in another vector, you can int...

How to find the intersection point by plotting the red line like below?

Assuming you have the water level in a vector, lets call it h, along with the values of pExceed in another vector, you can int...

6 días ago | 1

Answered

How can I achieve Matrix-Vector element-wise operations in Simulink Matlab Function Block?

I'm not sure why the MATLAB Function block can not handle the implicit scalar expansion, but I just tried using an Interpreted M...

How can I achieve Matrix-Vector element-wise operations in Simulink Matlab Function Block?

I'm not sure why the MATLAB Function block can not handle the implicit scalar expansion, but I just tried using an Interpreted M...

7 días ago | 0

| accepted

Answered

For LOOP for splitting an ECG signal into different CHUNKS

It's not really clear to me from your description what you are trying to do. From what I can infer from your description you ha...

For LOOP for splitting an ECG signal into different CHUNKS

It's not really clear to me from your description what you are trying to do. From what I can infer from your description you ha...

7 días ago | 1

| accepted

Answered

How to fix the time values of repeating sequence to get triangular wave?

I'm sorry I also have no experience with Simulink for Power Electronics so I can not help you with any issues that are specific ...

How to fix the time values of repeating sequence to get triangular wave?

I'm sorry I also have no experience with Simulink for Power Electronics so I can not help you with any issues that are specific ...

7 días ago | 0

| accepted

Answered

How to fix the time values of repeating sequence to get triangular wave?

If you want to make a triangular wave of amplitude A with period T just use Time Values [0 T] Output Values [0 A] You don't h...

How to fix the time values of repeating sequence to get triangular wave?

If you want to make a triangular wave of amplitude A with period T just use Time Values [0 T] Output Values [0 A] You don't h...

7 días ago | 0

Answered

Controlling Dynamic Stability Using Torque Vectoring.

MATLAB Answers is a good place to come for help with problems that you are having once you get far enough to actually be working...

Controlling Dynamic Stability Using Torque Vectoring.

MATLAB Answers is a good place to come for help with problems that you are having once you get far enough to actually be working...

7 días ago | 0

Answered

Run cmd command from MATLAB

The system command can definitely be used for this purpose. I suspect that your problem is with the string you are passing the c...

Run cmd command from MATLAB

The system command can definitely be used for this purpose. I suspect that your problem is with the string you are passing the c...

7 días ago | 0

Answered

How to create a Toeplitz matrix?

You can use MATLAB toeplitz function for this. See the documentation by typing doc toeplitz on the command line. Since your to...

How to create a Toeplitz matrix?

You can use MATLAB toeplitz function for this. See the documentation by typing doc toeplitz on the command line. Since your to...

8 días ago | 1

| accepted

Answered

Unable to perform assignment because the left and right sides have a different number of elements.

In your expression, the left hand side is just a scalar (only has one element) but you are trying to assign a length 4 column ve...

Unable to perform assignment because the left and right sides have a different number of elements.

In your expression, the left hand side is just a scalar (only has one element) but you are trying to assign a length 4 column ve...

8 días ago | 0

| accepted

Answered

Givens rotation QR decomposition

It looks to me like your code reproduces what is in the pseudocode. Are you sure that the psuedocode that you based your code o...

Givens rotation QR decomposition

It looks to me like your code reproduces what is in the pseudocode. Are you sure that the psuedocode that you based your code o...

8 días ago | 0

Answered

Saddle points of a 2D matrix

Here is a simple approach. Note I define a saddle point as one that is either the largest in its column and smallest in its row ...

Saddle points of a 2D matrix

Here is a simple approach. Note I define a saddle point as one that is either the largest in its column and smallest in its row ...

8 días ago | 0

| accepted

Answered

I need help with the model of vertical axis wind turbine

Here's a paper that shows an example of using Simulink to model a vertical axis wind turbine: Modeling of a Vertical Axis Wind ...

I need help with the model of vertical axis wind turbine

Here's a paper that shows an example of using Simulink to model a vertical axis wind turbine: Modeling of a Vertical Axis Wind ...

8 días ago | 0