Displaying 4 results from an estimated 4 matches for "optimset".
2010 Mar 04
2
Hi
How Can I write this this matlab code in R:
options=optimset('TolFun',1e-9,'TolX',1e-9,'MaxIter',1e8,'MaxFunEvals',1e8);
c=c/2;
[alpha, delta, epsilon, nofcup] = ustrs(set_date,mat_date);
y = fminsearch('pbond',.15,options,p,c,nofcup,delta/epsilon);
y = 200*y;
Note
pbond is a function in Matlab I already wrote in...
2012 May 08
1
Translation of Linear minimization probelm from matlab to r
Hi everyone, i?m a new user of R and i?m trying to translate an linear
optimization problem from Matlab into r.
The matlab code is as follow:
options = optimset('Diagnostics','on');
[x fval exitflag] = linprog(f,A,b,Aeq,beq,lb,ub,[],options);
exitflag
fval
x=round(x);
Where:
f = Linear objective function vector (vector of 45,rows)
A = Matrix for linear inequality constraints (3colums 45 rows matrix)
b = Vector for linear inequality...
2009 Feb 05
2
Non-linear optimisation
...m_ret_reb, prices_TR, hedge_fund, vg, euribor, last_reb_date, Maturity,
fixed_fees, var_fees);
objFunc_vol(C);
objFunc = @(C) compute_strategy_before_fees(prices, C, floor, cap,
m_ret_reb, prices_TR, hedge_fund, vg, euribor, last_reb_date, Maturity,
fixed_fees, var_fees);
objFunc(C);
options = optimset('MaxIter',10000000,'MaxFunEvals',10000000);
tic;
% OPTIMISE
%M =
fmincon(objFunc,C,[],[],[],[],repmat(-20,12,9),repmat(20,12,9), at TriskellConstraints,options);
M =
fmincon(objFunc_vol,C,[],[],[],[],repmat(-20,12,9),repmat(20,12,9), at TriskellConstraints,options);
[Z, ZZ] = com...
2007 Sep 24
1
Root finding problem
...one value for u as a starting guess. Could anyone
please give me a suggestion of how to do that? Thanks in advance.
In MATLAB I do the following:
function u=tukeysolve(a,lambda,xgrid)
u=zeros(length(xgrid),1);
old=0.001; % just a guess
for i=1:length(xgrid)
x=xgrid(i);
u(i) = fsolve(@tuki,old,optimset('Display','Off','tolf',5e-8),x,a,lambda);
old=u(i); % use previous value as new start value
end
function f=tuki(u,x,a,lambda)
f = x - (a * u^lambda - (1-u)^lambda)/lambda;