疑问:9 \% p! _: k& W( P. L" W3 I# T
为什么在运行下边程序时,总是提示“??? Undefined function or method 'asamin' for input arguments of type 'char'.” ' U/ X1 @! x2 b3 c xError in ==> HestonASACalibration at 14; E. e; {2 X6 D3 L
asamin('set','test_in_cost_func',0)1 S9 ~, v: n, _9 {+ ]; j7 P
我在网上查了下,这是在运ASA时,没定义函数的类型……总之,不是很理解,更不知该怎么改正???% V7 v5 S5 c6 L7 ?9 r& X
; ^! s/ o7 x8 r, t8 o! h: x 完整程序 * i4 M: w' |; F2 G. vclear;6 B, {$ c7 W* M( Y& s
global OptionData;9 R4 k' o6 N8 H: Z! b$ G
global NoOfOptions;) ?4 @" U8 r" A1 y6 F
global NoOfIterations; 8 \: R, d) o7 h& y5 h global PriceDifference; : b# o+ Q8 U; E1 ~, \9 N global ObjectiveFunc;. M* y6 Z! x0 j' I' x2 S+ @ b
NoOfIterations = 0;6 p( G/ ?) L+ B }3 h o# K
%OptionData = [r,T,S0,K,Option Value,bid,offer] ; Q/ w; M; L! A' O% Y& I Size = size(OptionData);% e, ]3 {. A' d9 O3 l: @
NoOfOptions = Size(1);* q' j' U% N8 S' _( Y& | h3 E
%input sequence in initial vectors [kappa,theta,sigma,rho,v0] ; {- I) W8 r& R$ T% M m x0 = [0.030854841 0.999999922 0.248415019 -1 0.08977599]; ( y2 B$ ~% i* F6 A7 d lb = [0 0 0 -1 0];ub = [10 1 5 0 1];$ V; T$ V/ m) M0 Y9 L+ {4 [
asamin('set','test_in_cost_func',0)( X/ x6 Q3 ]) X
tic;3 E) b$ r* V6 O4 G& `; T, g
[fstar, xstar, grad, hessian, state] = asamin('minimize',... ; M9 M0 B k/ v z5 X 'HestonCostFunc',x0',lb',ub',-1*ones(5,1));% k) K* }0 r! s5 A, B4 {5 o
toc; %秒表计时器5 w0 K! l3 Y, r0 I! u7 P
出错程序# T I% q% ^$ q1 B& t1 P" ?
asamin('set','test_in_cost_func',0) ; d) `: N8 M2 q0 |# R/ M, I: o运行提示错误为: 7 Z$ P# }2 g' i: q% y??? Undefined function or method 'asamin' for input arguments of type 'char'.