0

下面是代码和错误信息。我正在尝试计算自举协方差矩阵和均值。知道为什么我的尺寸不一致吗?

问候,

RawReturn = csvread('Raw return data.csv');
bootstat = bootstrp(1000, @(x)[mean(x), cov(x)], RawReturn);
-------------------------------------------------------------

Error using horzcat
Dimensions of matrices being concatenated are
not consistent.

Error in @(x)[mean(x),cov(x)]


Error in bootstrp (line 167)
 bootstat = feval(bootfun,bootargs{:});

Error in Efficient_frontier (line 2)
bootstat = bootstrp(1000, @(x)[mean(x), cov(x)],
RawReturn);

Caused by:
Unable to evaluate BOOTFUN with the supplied
arguments.
4

0 回答 0