index in position 2 exceeds array bounds (must not exceed 1)

1 次查看(过去 30 天)
this is my code
Total_amount = 100000000;
senarios = 10000
years = 5
% Lower bin of the matrix
load("QFRM_Data (2).mat")
AEX_ = AEX(:,[6])
NASDAQ_= NASDAQ(:,[6])
Nikkei_= Nikkei(:,[6])
Treasury_= Treasury(:,[6])
EURJPY_= EURJPY(:,[6])
EURUSD_= EURUSD(:,[6])
n=1;
suma=0
for n=1:1:10000
Treasury_(1,n)
suma=Treasury_(1,n)+suma;
norminv=1-suma
n=n+1;
end
n=1;
suma=0
for n=1:1:10000
AEX_(1,n)
suma=AEX_(1,n)+suma;
norminv1=1-suma
n=n+1;
end
n=1;
suma=0
for n=1:1:10000
NASDAQ_(1,n)
suma=NASDAQ_(1,n)+suma;
norminv2=1-suma
n=n+1;
end
n=1;
suma=0
for n=1:1:1000
Nikkei_(1,n)
suma=Nikkei_(1,n)+suma;
norminv3=1-suma
n=n+1;
end
im stuck , i have no idea how to solve this, could someone enligten me ?
thanks in advance !
  10 个评论

请先登录,再进行评论。

回答(1 个)

Adam Danz
Adam Danz 2021-4-7
Change Treasury_(1,n)
To Treasury_(n,1)

类别

Help CenterFile Exchange 中查找有关 Data Preprocessing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by