function Variancee = VarObjective(VCVMatx, WStarSave);
Variancee = WStarSave * VCVMatx * WStarSave';
[x, fval] = fmincon('VarObjective', WStarSave', swtOther_A, swtOther_b, AeqMatx, BeqMatx, swtMinWt', swtMaxWt')
WStarSave = 1 X 10 matrix of weights
swtOther_A = [ 0 0 0 0 -1 0 0 -1 0 -1 ; 0 0 0 0 1 0 0 1 0 1];
swtOther_b = [ -0.06 ; +0.40 ];
AeqMatx(1, :) = swtOther_Aeq; where this equals [ 1 1 1 1 1 1 1 1 1 1 ];
AeqMatx(2, :) = returnMatx(1, :);
AeqMatx(3, :) = [1 0 1 0 0 0 1 0 0 0];
BeqMatx(1, :) = swtOther_beq; where this equals [ 1.00 ];
BeqMatx(2, :) = ERGrid(i, 1); where this i will change into the loop
BeqMatx(3, :) = [.22];
Not enough input arguments.
Error in VarObjective (line 3)
Variancee = WStarSave * VCVMatx * WStarSave';
Error in fmincon (line 552)
initVals.f = feval(funfcn{3},X,varargin{:});
Error in FEHW7 (line 205)
[x, fval] = fmincon('VarObjective', WStarSave', swtOther_A, swtOther_b, AeqMatx, BeqMatx, swtMinWt', swtMaxWt');
Caused by:
Failure in initial objective function evaluation. FMINCON cannot continue.