Question


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

13 years ago | 1 answer | 0

1

answer

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

13 years ago | 0

Question


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

13 years ago | 3 answers | 0

3

answers

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

13 years ago | 0

| accepted

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

13 years ago | 0

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

13 years ago | 0

Question


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

13 years ago | 2 answers | 0

2

answers

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

13 years ago | 0

Question


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

13 years ago | 3 answers | 1

3

answers

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

13 years ago | 0

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

13 years ago | 0

Question


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

13 years ago | 3 answers | 0

3

answers

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

13 years ago | 0

Question


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

13 years ago | 2 answers | 0

2

answers

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

13 years ago | 0

Question


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

13 years ago | 4 answers | 0

4

answers

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

13 years ago | 0

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

13 years ago | 0

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

13 years ago | 0

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

13 years ago | 0

Question


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

13 years ago | 2 answers | 0

2

answers

Question


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

13 years ago | 5 answers | 0

5

answers

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

13 years ago | 0

Question


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

13 years ago | 2 answers | 0

2

answers

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

13 years ago | 0

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

13 years ago | 0

Question


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

13 years ago | 3 answers | 0

3

answers

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

13 years ago | 0

| accepted

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

13 years ago | 0

Question


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

13 years ago | 3 answers | 0

3

answers

Load more