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

1 view (last 30 days)
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

Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!