matlab table from for loops
古いコメントを表示
for iter = 1:2
Num_of_Banks = 4
Initial_Capitals = [ randi([0 100],Num_of_Banks,1) ]
Total_initial_caps = sum(Initial_Capitals)
end
This will set Num_of_Banks = always 4 and Initial_Capitals = rand
How can I create a table from X num of iterations (Prob = everything that I have tried til now) and store correctly the results?
Trying to make sth like this:
Num_of_Banks Initial_Capitals
4 amount 1
4 amount 2
4 amount 3
... ...
(My prog has almost 50 variables to be added so this is a small part of it)
Will appreciate your answers
(R2016a version)
2 件のコメント
dpb
2019 年 8 月 19 日
Do you really intend for the #Banks variable to be constant for some N rows or is that also a random or otherwise known number?
Is the initial amount for each one of the random values?
Antonio Grivas
2019 年 8 月 19 日
編集済み: Antonio Grivas
2019 年 8 月 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!