Info

此问题已关闭。 请重新打开它进行编辑或回答。

How do I write a loop in Matlab

2 次查看(过去 30 天)
Robert Henson
Robert Henson 2019-4-16
关闭: MATLAB Answer Bot 2021-8-20
How do I write a (double) loop in Matlab that goes through multiple pairs of interest to compute the ADF or Johansen test to see if they cointegrate.
  1 个评论
Walter Roberson
Walter Roberson 2019-4-16
Maybe something like
rows = size(YourMatrix,1);
for J = 1 : rows
for K = J+1 : rows
result(J,K,:) = jcitest(YourMatrix([J K],:));
result(K,J,:) = result(J,K,:);
end
end

回答(0 个)

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by