Pregunta


Compute in symbolic math toolbox the result of function f(x) for x equals another symbolic expression
I have two functions defined with symbolic toolbox such as: f(x)=a*x; g(x)=b*x^2; I want to set to x another symbolic...

alrededor de 13 años hace | 1 respuesta | 0

1

respuesta

Respondida
Step function with a ramp. Error in the creation of the ramp
I didn't know about linspace. I would definitely try it out. Thank you both!

alrededor de 13 años hace | 0

Pregunta


Step function with a ramp. Error in the creation of the ramp
I am trying to create a ramp which is a part of a step function in order to plot it. x=1e-6:1e-6:L; for i=1:10 bl(...

alrededor de 13 años hace | 3 respuestas | 0

3

respuestas

Respondida
Global Search optimization error
Thank you Alan for the numerous times that you have tried to answer my questions. Well I tried your suggestion but again result...

alrededor de 13 años hace | 0

| aceptada

Respondida
Error in series summation
I have tried the matlab script above in other pc's without a problem. I cannot understand why is this happening.

alrededor de 13 años hace | 0

Respondida
Error in series summation
If I do it for pb=symsum(Pt,n,1,n); I get the result: pb=(8*(2*Rb*S^3*jmpp^2*lf^2*n^3 + 3*Rb*S^3*jmpp^2*lf^2*n^2...

alrededor de 13 años hace | 0

Pregunta


Error in series summation
I am trying to do a summation of a series as shown below: syms x n S lf Wf jmpp Rb Wb Iline=4*jmpp*S*lf/Wf; ...

alrededor de 13 años hace | 2 respuestas | 0

2

respuestas

Respondida
Constraint syntax of a matrix variable in optimization
Thank you Matt for the answer. I haven't tried yet neither of the solutions you have suggested but pretty soon I will look at th...

alrededor de 13 años hace | 0

Pregunta


Constraint syntax of a matrix variable in optimization
Suppose that a function is has a vector input martri x. And x is of the form: x(:,1) x(:,2) x(:,3) how should the...

alrededor de 13 años hace | 3 respuestas | 1

3

respuestas

Respondida
Optimizing a function with many many arguments
Well I could place it first but that is not what I am looking for. Anyway thank you Matt.

alrededor de 13 años hace | 0

Respondida
Optimizing a function with many many arguments
Basically I would like from another script to execute the optimization. So the function is saved in another script. When I do ...

alrededor de 13 años hace | 0

Pregunta


Optimizing a function with many many arguments
I have a function which has many outputs. I would like to find the minimum of one of the outputs by optimizing the function. Sin...

alrededor de 13 años hace | 3 respuestas | 0

3

respuestas

Respondida
Building a matrix with a varying column length
Thank you Walter

alrededor de 13 años hace | 0

Pregunta


Building a matrix with a varying column length
I am trying to build a matrix whose rows are as many as the length of D (see below) and whose columns vary. Because this is impo...

alrededor de 13 años hace | 2 respuestas | 0

2

respuestas

Respondida
Global Search optimization error
Thank you Alan. The optimization is now running. What I notice thought is that many of the optimized variables are forced to the...

alrededor de 13 años hace | 0

Pregunta


Global Search optimization error
I am trying to run a global search optimization in order to minimize a function. When I run it, I receive the following error: ...

alrededor de 13 años hace | 4 respuestas | 0

4

respuestas

Respondida
Write nonlinear constraint to fmincon
I would like one of the optimized variables to be an integer. Is there a way to achieve this with fmincon. In global optimizat...

alrededor de 13 años hace | 0

Respondida
Write nonlinear constraint to fmincon
I am sorry. Indeed I had a mistake in the boundaries. I had four elements instead of 5.

alrededor de 13 años hace | 0

Respondida
Write nonlinear constraint to fmincon
Thank you Benji for the answer. This would make sense if I had not defined x(5) in the function that I would like to optimize. I...

alrededor de 13 años hace | 0

Respondida
Write nonlinear constraint to fmincon
Attempted to access x(5); index out of bounds because numel(x)=4. Error in power_fraction2 (line 7) Pf=(2*Rf*jmpp*x(2)^3*(x(...

alrededor de 13 años hace | 0

Pregunta


Optimization of a function using the fmincon
I am trying to find the minimum of a function by using the fmincon. My function is a bit complicated.I get the following messag...

alrededor de 13 años hace | 2 respuestas | 0

2

respuestas

Pregunta


Write nonlinear constraint to fmincon
I am using fmincon to optimize a vectorized function (myfun) of five variables (x). This function has also some parameters (k, l...

alrededor de 13 años hace | 5 respuestas | 0

5

respuestas

Respondida
Limits within function and optimization with accurracy
Regarding the optimization I am using the simulannealbnd function. I am setting the options as followed: options=saoptims...

alrededor de 13 años hace | 0

Pregunta


Limits within function and optimization with accurracy
I have the following function: function [T, P1, P2]=myfun(x, a, b, c, d, e) P1=(2*c*a*x(2)^3*(e - x(1))^2)/(3*e*d*b*x(1));...

alrededor de 13 años hace | 2 respuestas | 0

2

respuestas

Respondida
Produce a legend in for loop that takes entries from an array
Thank you Matt

alrededor de 13 años hace | 0

Respondida
Produce a legend in for loop that takes entries from an array
Thank you. Indeed that is much more simple and efficient. On the other hand what if I want to have a constant character cell i...

alrededor de 13 años hace | 0

Pregunta


Produce a legend in for loop that takes entries from an array
Merry Christmas to all of you. I am trying to incorporate a legend in for loop. my code is the following: s=['T '; 'Pb...

alrededor de 13 años hace | 3 respuestas | 0

3

respuestas

Respondida
Build a matrix of data and insert them in a function
What I wanted was the following: for i=2:4 B(i)=B(1,i-1); for j=2:11 A(1,j)=A(1,j-1); ...

alrededor de 13 años hace | 0

| aceptada

Respondida
Build a matrix of data and insert them in a function
Indeed I have to be more clear. I understand the use of bsxfun. But what if I have a much more complicated function? And to ...

alrededor de 13 años hace | 0

Pregunta


Build a matrix of data and insert them in a function
I have a function. Suppose function y=A(1)*B+A(2) in which A is an array of _2 x m_ elements and B is a vector of n elem...

alrededor de 13 años hace | 3 respuestas | 0

3

respuestas

Cargar más