[help] Error using ==> fmincon Too many input arguments
古いコメントを表示
When I run a simulation of local constant cross validation for multivariables, I encountered the problem of too many input arguments.
function cv_m = lccvm(z,xc,xd,b,n) sum1 = 0 for i = 1:n dxc = (xc-xc(i,1))/(z(1)*n^(-1/5)) kc=exp(-0.5*dxc.^2); % continous kernel l=(xd==xd(i,1))+z(2)*(xd~=xd(i,1)); % discrete kernel k=kc.*l; % mixed kernel k(i,0)=0; % leave-one-out gx1=sum(b.*k)/sum(k); sum1=sum1+(b(i,1)-gx1)^2 end cv_m = 1/n*sum1;
and the bounds of z are z(1) from 0 to 20 z(2) from 0 to 1 there is no other constraint.
4 件のコメント
Sarah Wait Zaranek
2011 年 3 月 23 日
Is lccvm your objective function for fmincon?
Kang Wang
2011 年 3 月 24 日
Kang Wang
2011 年 3 月 24 日
Walter Roberson
2011 年 3 月 24 日
Refer to my Answer: it is exactly what is going on in your situation.
採用された回答
その他の回答 (1 件)
Ruslan Dautkhanov
2015 年 3 月 16 日
0 投票
カテゴリ
ヘルプ センター および File Exchange で MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!