Domanda


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...

circa 13 anni fa | 1 risposta | 0

1

risposta

Risposto
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!

circa 13 anni fa | 0

Domanda


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(...

circa 13 anni fa | 3 risposte | 0

3

risposte

Risposto
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...

circa 13 anni fa | 0

| accettato

Risposto
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.

circa 13 anni fa | 0

Risposto
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...

circa 13 anni fa | 0

Domanda


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; ...

circa 13 anni fa | 2 risposte | 0

2

risposte

Risposto
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...

circa 13 anni fa | 0

Domanda


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...

circa 13 anni fa | 3 risposte | 1

3

risposte

Risposto
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.

circa 13 anni fa | 0

Risposto
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 ...

circa 13 anni fa | 0

Domanda


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...

circa 13 anni fa | 3 risposte | 0

3

risposte

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

circa 13 anni fa | 0

Domanda


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...

circa 13 anni fa | 2 risposte | 0

2

risposte

Risposto
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...

circa 13 anni fa | 0

Domanda


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: ...

circa 13 anni fa | 4 risposte | 0

4

risposte

Risposto
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...

circa 13 anni fa | 0

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

circa 13 anni fa | 0

Risposto
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...

circa 13 anni fa | 0

Risposto
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(...

circa 13 anni fa | 0

Domanda


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...

circa 13 anni fa | 2 risposte | 0

2

risposte

Domanda


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...

circa 13 anni fa | 5 risposte | 0

5

risposte

Risposto
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...

circa 13 anni fa | 0

Domanda


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));...

circa 13 anni fa | 2 risposte | 0

2

risposte

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

circa 13 anni fa | 0

Risposto
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...

circa 13 anni fa | 0

Domanda


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...

circa 13 anni fa | 3 risposte | 0

3

risposte

Risposto
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); ...

circa 13 anni fa | 0

| accettato

Risposto
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 ...

circa 13 anni fa | 0

Domanda


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...

circa 13 anni fa | 3 risposte | 0

3

risposte

Carica altro