Creating a two dimensional array using a for loop with two variables as a parameter

Hello
I'm still working on my car model. I want to run my model in a for loop so I don't need to insert the parameters again after each run. The input variables of my model are steering angle (d) and velocity (v). I need to do runs with 3 different d's and 3 different v's. The result should look like this
Result(d1, d2, d3; v1, R1, R2, R3; v2, R4, R5, R6; v3, R7, R8, R9)
I already have: v = [10,15,20]; d = [8,10,12];
for x=v, y=d
h.assignin('v',x);
h.assignin('d',y);
but does Matlab give the output I want when I do this?
Thanks

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

質問済み:

2014 年 5 月 7 日

編集済み:

2014 年 5 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by