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

1 vue (au cours des 30 derniers jours)
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

Réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by