Community Profile

Sargondjani

96 2012 年以降の合計貢献数

Sargondjani's バッジ

Second Order optimality fmincon
Someone explained the second order condition for optimality of a constrained optimization problem here: https://math.stackexch...

8ヶ月 前 | 0 件の回答 | 0

0

Incorrect solution for symmetric problems in fmincon
If I maximize XX(1)^2+XX(2)^2 subject to x1 + x2 <=1 and use starting value X0=[0.5,0.5] I get as solution X=[0.5,0.5], although...

9ヶ月 前 | 1 件の回答 | 0

1

patternsearch with nonlinear equality constraint: any advice for more efficient steps?
Dear all, I have a constrained optimization problem which is not differentiable (because of some random errors), but it should ...

12ヶ月 前 | 0 件の回答 | 0

0

How to normalize curves with multiple peaks such that each peak will be 1 and each valley will be 0?
Yeah, you would have to calculate a scaling factor for each peak/trough. In one dimension you can then use the scaling factor fo...

Tangent at a given point to a nonlinear curve
I think you need to be a bit more precise in what you want: you have data with errors in them, and you want to fit a curve that ...

| 採用済み

Matlab R2014A blurry on high-dpi windows device
Two things did it for me: 1. go to matlab/bin and right click application, choose compatibility and check "disable scaling on h...

4年弱 前 | 0

fmincon and exitflag = -2 or 2 / non respect of constrained conditions
getting exit message 2 is not bad but if you insist on having 1, you could try to use smaller values for TolX (ie.. 1e-10 or eve...

5年弱 前 | 0

| 採用済み

Why does the first value in loop get overwritten
Thanks guys... normally i never save iteration variables like 'fi' but in this case the files contained "fi = 1". very silly

Why does the first value in loop get overwritten
For some reason when fi == 1, NPV_list(1,1) is inserted correctly, but when fi=2 the value gets overwritten, which i dont unders...

3

Vectorize sum of discount rates
thank you all for you answers... all did what i wanted, but the one by Matt Fig is the most simple

Vectorize sum of discount rates
Hi, I want to vectorize the calculation of series like this: [R^0;R^0+R^1;R^0+R^1+R^2;...etc. Im quite sure this should b...

4

sum elements of matrix if...
It seems i can not edit my comment... so here again (sorry for mess, but i forgot to 'code' my code) Ok, i was not clear let ...

7年以上 前 | 0

sum elements of matrix if...
Hi, lets say i have two matrices: A=rand(5,10); B=[ones(1,10);3*ones(1,10);ones(1,10);ones(1,10);3*ones(1,10)]; I...

7年以上 前 | 2 件の回答 | 0

2

fixed-point iteration for root finding
a while loop might be a good idea: err_lim = 1e-6; x_new = %initial guess err = err_lim *2; %arbitrary to pass while ...

7年以上 前 | 0

how to solve a system of equations with n equation and m unknown (m>n)?
i think fmincon (constrained optimization) will work best... if you try to minimize some error use as the objective: objective=e...

7年以上 前 | 0

How to stop nonlinear fitting and obtain the results of fitting at that iteration
the display iter only displays something after an iteration is complete (after all function evaluations of that iteration are do...

7年以上 前 | 0

How to stop nonlinear fitting and obtain the results of fitting at that iteration
im no expert on this (sorry) but did you try the 'output' function thingy... i know for most optimizers there is such a thing. i...

7年以上 前 | 0

what is the optimal way to build a sparse matrix from row/col index, and value data?
did you check 'sparse'? i think this will do what you want: S = sparse(i,j,s) where i,j,s are your 3 column vectors... htt...

7年以上 前 | 0

| 採用済み

Optimization: Which algorithms I should choose when it's difficult to define an objective function?
...and if your problem is continuous, then the other optimizers are more usefull (fminsearch, fminunc, fsolve, fmincon,...). ...

7年以上 前 | 0

how can i remove this error in matlab?
ermm, what error? and what do you actually want the line to achieve? i mean, the code wants to assign a matrix with blanks to co...

7年以上 前 | 0

Problem using 'deal' for objective and gradient in comb. with 'DerivativeCheck'
When using optimization tools I usually keep my objective function and gradient function as separate subfunctions and then use '...

7年以上 前 | 1 件の回答 | 0

1

The problem in fminsearch function error
i dont know what you want this to do: x = sym(zeros(6,1)); for i=1:1:6 x(i) = sym(sprintf('x%d',i)); end or: ...

7年以上 前 | 0

| 採用済み

Calculating stationary distribution of Markov chain
I am calculating the stationary distribution of a Markov chain. The transition matrix P is sparse (at most 4 entries in every co...

7年以上 前 | 2 件の回答 | 1

2

me not like new lay out of this section! (not a question)
i dislike the new lay out of this section, because now only 2 or 3 questions fit on my screen, ie. any overview is lacking and i...

7年以上 前 | 2 件の回答 | 2

2

problem with dynamic optimization solution when increasing the scaling parameter value of the objective function
What is your utility function and how do you scale it? And is zero also your starting value for the controls? The only thing...

7年以上 前 | 0

first you should try yourself to solve the equation when there is just 1 line (1 a and a_1). see what's happening... and then in...

7年以上 前 | 0

| 採用済み

Vectorizing finding indexes
Hmmmmm, andrei and jamie: do your solutions only work when Y consists of integers??? In my example Y was just integers, but in f...

7年以上 前 | 0

Vectorizing finding indexes
hi, i have a vector X and a vector Y (both in ascending order). for every element in X i want the indexes of the values in Y be...

7年以上 前 | 4 件の回答 | 0

4

using fminsearch on several data sets simultaneously
As an alternative you could make an optimization routine for K only. That way you would not need fminunc. It would look very ...

7年以上 前 | 1

| 採用済み

using fminsearch on several data sets simultaneously
To answer the original post: if you have N data sets, you just have to combine the objective functions for the N data sets, so ...

7年以上 前 | 0