Dimensions of matrices being concatenated are not consistent.

1 回表示 (過去 30 日間)
economics student
economics student 2018 年 12 月 16 日
編集済み: per isakson 2018 年 12 月 16 日
Hi, im having trouble in running a programm for the following reason: Dimensions of matrices being concatenated are not consistent.
vector names correspond to the forecast error decomposition of variance, as mentioned in %P=chol(Omega); Choleski factorization
However vectors have the same number of columns:
Y=data;
% will print results to the MATLAB command window
% set flag for Sim's correction factor
sims = 1;
maxlag = 12;
minlag = 1;
lrratio(Y,maxlag,minlag,sims);
%
T=length(Y);
NAR=1;
M=50;
H=12;
%
N=size(Y,2);
results=fvar(Y,NAR);
MPHI=mphi(results,NAR,N);
%matrix of variances y covariances
for i = 1:N
err(:,i) = results(i).resid;
end
Omega = err'*err/rows(err);
%P=chol(Omega); Choleski factorization
P=eye(N);
vnames = ['UNICREDIT ',
'CREDIT SUISSE ',
'SANTANDER ',
'UBS ',
'ING ',
'DEUTSCHE BANK ',
'HSBC ',
'SOCIETE GENERALE ',
'CREDIT AGRICOLE ',
'BNP PARIBAS ',
'BARCLAYS '];
vnames1 = ['unicredit ',
'credit suisse ',
'santander ',
'ubs ',
'ing ',
'deutsche bank ',
'hsbc ',
'societe generale ',
'credit agricole ',
'bnp paribas ',
'barclays '];
names={'UNICREDIT ' 'CREDIT SUISSE ' 'SANTANDER ' 'UBS ' 'ING ' 'DEUTSCHE BANK ' 'HSBC ' 'SOCIETE GENERALE ' 'CREDIT AGRICOLE ' 'BNP ' 'BARCLAYS '};

採用された回答

per isakson
per isakson 2018 年 12 月 16 日
編集済み: per isakson 2018 年 12 月 16 日

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by