Info
此问题已关闭。 请重新打开它进行编辑或回答。
How do I write a loop in Matlab
2 次查看(过去 30 天)
显示 更早的评论
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
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!