Prev: Saving as .mat vs .m
Next: how do you detect spikes?
From: diana van dijk on 11 Jun 2010 14:05 Hi, I was wondering if it's possible to introduce a linear constraint in fmincon: Aeq*x = beq, where x is the optimized variable X as a function of the state variables i,j,m. And, beq is the optimized value X from m-1 (so, fixing the optimized X). What I'm trying to do: n=3; m=1:n; loop over i,j,m... if (m<n) %if m<n --> X(i,j,m) = X(i,j,m-1) Aeq=[1 0]; beq=X(i,j,m-1) elseif (m==n) %if m=n --> X(i,j,m) = unconstrained Aeq=[]; beq=[]; end I'm looking forward to suggestions, Diana
|
Pages: 1 Prev: Saving as .mat vs .m Next: how do you detect spikes? |