各位编程高手,请教这个matlab程序,如何运行或者修改,谢谢!具体为:
function [ x, fval, n,g,p,LI,GI,Fw,mP,LR,GA,mAgg,AN,A,W,YOverII,LSTIIP1Onu,JPLow,JP,II,Y,LS ] = jmpCalibrate
clear;
global beta nu T gN GN
beta = 99/100;
nu = 2;
T = 80;
gN = 0.003111562156600730;
GN = exp(gN);
start = [0.0763661582373014;10.5450641571198;0.0452908924969530;160.961133865592;];
% start = [ 0, 1/2, 1/6, 13, 1/20, 1/40, 40 ]';
jmpToMin( start )
% jmpConstraints( start )
% [ x, fval ] = fmincon( @jmpToMin, start, [], [], [], [], zeros( 1, 7 )', [ 1, 1, 1, Inf, 1, 1, Inf ]', @jmpConstraints2, optimset( 'Algorithm', 'interior-point', 'Display', 'iter', 'MaxFunEvals', 1000000, 'MaxIter', 1000000, 'UseParallel', 'never', 'FinDiffType', 'central' ) );
cmaes_opts = cmaes( 'defaults' );
cmaes_opts.CMA.active = 1;
cmaes_opts.PopSize = 2 * 4 * 4;
cmaes_opts.Restarts = 0;
cmaes_opts.LBounds = zeros( 1, 4 )';
cmaes_opts.UBounds = [ 1, Inf, 1, Inf ]';
[ ~, ~, ~, ~, ~, BestEver ] = cmaes( 'jmpToMin', start, 0.4, cmaes_opts ); % [], [], [], [], zeros( 1, 6 ), [ 1, 1, Inf, 1, 1, Inf ], @jmpConstraints, optimset( 'Algorithm', 'sqp', 'Display', 'iter', 'MaxFunEvals', 1000000, 'MaxIter', 1000000, 'UseParallel', 'always', 'TypicalX', start, 'FinDiffType', 'central', 'DiffMaxChange', 1e-6 ) );
x = BestEver.x;
fval = BestEver.f;
[n,g,p,LI,GI,Fw,mP,LR,GA,mAgg,AN,A,W,YOverII,LSTIIP1Onu,JPLow,JP,II,Y,LS] = jmpDisplay( x );
fprintf( 1,'n:=%.20f; g:=%.20f; p:=%.20f; LI:=%.20f;\n', n, g, p, LI );
end
运行后出现如下错误:
??? Error: File: C:\Documents and Settings\Administrator\桌面\pppp_files\main\jmpCalibrate.m Line: 20 Column: 8
Expected a variable, function, or constant, found ",".