creating new vectors within a loop
显示 更早的评论
hi,
i need do make a script that will generate new vectors within a loop, so i can control the number of vectors i need.
for example i wrote a simulation for two masses and to describe the change in their velocity over time i created two vectors of v and two vectors of the change in v over time.
but now i need to write the same code for n masses and i wonder if there is a way to define the new vectors for each mass within a loop that will genarete them or i have to keep do it manually? (wich will make the code a real mess as i add more and more masses)
采纳的回答
更多回答(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!