به اشتباهم پی برده بردم :)
انجامش دادم. مهندس ، در ادامه باز constrfun مزاحم میشه. چطوره باشه ولی تهی باشه؟ الآن باز گیر داد.
پیغام :
>> interfac
**************************** interfac.m *************************
User interface for the relaxation algorithm
************************************* relax.m ********************************************
Number of players is 10.
The starting point is: [ [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] ]
Iteration 1
Warning: Options LargeScale = 'off' and Algorithm =
'trust-region-reflective' conflict.
Ignoring Algorithm and running active-set method. To run
trust-region-reflective, set
LargeScale = 'on'. To run active-set without this warning, use Algorithm =
'active-set'.
> In fmincon at 412
In z_const at 16
In relax at 101
In interfac at 45
z(x) = [ [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] ]
Warning: Options LargeScale = 'off' and Algorithm =
'trust-region-reflective' conflict.
Ignoring Algorithm and running active-set method. To run
trust-region-reflective, set
LargeScale = 'on'. To run active-set without this warning, use Algorithm =
'active-set'.
> In fmincon at 412
In relax at 122
In interfac at 45
alpha =
0.5000
x0 =
Columns 1 through 7
0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000
Columns 8 through 10
0.5000 0.5000 0.5000
Warning: Options LargeScale = 'off' and Algorithm =
'trust-region-reflective' conflict.
Ignoring Algorithm and running active-set method. To run
trust-region-reflective, set
LargeScale = 'on'. To run active-set without this warning, use Algorithm =
'active-set'.
> In fmincon at 412
In op_alph3 at 26
In fmincon at 519
In relax at 122
In interfac at 45
??? Undefined function or method 'str2func' for input arguments of type
'double'.
Error in ==> relaxconstr at 9
cf = str2func(constrfun);
Error in ==> fmincon at 599
[ctmp,ceqtmp] = feval(confcn{3},X,varargin{:});
Error in ==> relax at 122
alpha =
fmincon(@op_alph3,0.5,[],[],[],[],0,1,@relaxconstr,options,x,z,dims,lowerbound,uppe rbound,[],[],toler);
Error in ==> interfac at 45
[p, ps, c, cs, n, a, l, t, exitflag] = relax(start, dims, lowerbound,
upperbound, precision, maxits, alphamethod, toler);
Caused by:
Failure in initial user-supplied nonlinear constraint function
evaluation. FMINCON cannot continue.