epoh 发表于 2010-9-29 16:42 
问题出在paretotails
建议你逐步执行code,
才容易除错.
for i=1:nStocks
OBJ{i}=paretotails(residuals(:,i),tailFraction,1-tailFraction,'kernel')
end
??? Error using ==> paretotails.paretotails>init at 177
Error calling CDFFUN function '@(x)ksdensity(x,'function','cdf')'.
Error in ==> paretotails.paretotails>paretotails.paretotails at 77
[lo,up,X,F,pLower,pUpper,qLower,qUpper] = init(x,pLower,pUpper,cdfFunc);
Caused by:
Error using ==> mtimes
Inner matrix dimensions must agree.
请问这是什么原因造成?