Question

fix parameters in function

I want to optimize one parameter of a function with three parameters. Lets say the function looks like this function f = functi...

4 months ago | 1 answer | 0

Question

How to transmit variables in problem structure

I am trying to set up a problem structure for fmincon ... gs = GlobalSearch; problem = createOptimProblem('fmincon','objectiv...

4 months ago | 1 answer | 0

Question

How to plot one point in one axis

I am trying to create a plot where I have only the x-axis. With xlim ([a b]) I can specifiy the length of the axis. I now wan...

4 months ago | 1 answer | 0

Question

How to save a vector in a for loop

I have a for loop which creates and plots a vector y. I now want to save each generated vector so I can compare them later. Does...

5 months ago | 1 answer | 0

Question

ode solver returns too many results

I am trying to solve a system of ode's with ode15s but it is not working properly. It is returning a vector of length 9 for my s...

6 months ago | 2 answers | 0

Answered

How to insert values for a symbolic variable

>> x = sym('x_%d',[13 1],'real'); >> y = sym('y_%d',[3 1],'real'); >> f1 = x(1)*x(2) f1 = x_1*x_2 >> x_vars = num2...

How to insert values for a symbolic variable

>> x = sym('x_%d',[13 1],'real'); >> y = sym('y_%d',[3 1],'real'); >> f1 = x(1)*x(2) f1 = x_1*x_2 >> x_vars = num2...

7 months ago | 0

Question

How to insert values for a symbolic variable

I'm calculating some gradients with symbolic variables and after that I want to insert values for the variables. So I have a f...

7 months ago | 2 answers | 0

Question

Publish equation in latex

I am working with symbolic expressions and I am calculating a vector which I want to publish formated with matlab. So my questi...

7 months ago | 1 answer | 0

Question

Find common factors in two expressions

Is there some function so I can find a common factor in multiple expressions? For example: syms x y a= 5*(x^4/y) b= 27*(x^...

9 months ago | 1 answer | 0