Making matrix whose submatrices are from for loop
古いコメントを表示
I'm trying to construct matrix whose submatrices are obtained in for loop. for loop is
for j = 2:Jmax
P(j-1)=(sqrt(-2*p(j-1)+1)/sqrt(-2*p(j-1)))*(I-(p(j)+p(j-1))*inv(A+p(j)*I))
V(j)=P(j-1)*V(j-1);
W=[W V(j)]
Is this ok? Also where to put V(1), can it be outside for loop?
2 件のコメント
James Tursa
2016 年 2 月 19 日
What are the dimensions of the variables? In particular, is P(j-1) expected to be a scalar or a matrix?
Ljix
2016 年 2 月 19 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!