How can I create a variable name from parts of another variable name

1 次查看(过去 30 天)
Let's say I have 2 vectors called time34578 and disp34578. Now I want to create a new vector vel34578 using displacement and time to compute. But I'm doing this in a script so I want to build the array name vel34578 not physically type it. How?
  3 个评论
jgg
jgg 2016-1-12
I agree with Geoff. It seems like there should be something generating these vectors that would make this easier.

请先登录,再进行评论。

采纳的回答

Stephen23
Stephen23 2016-1-12
编辑:Stephen23 2019-6-19

更多回答(1 个)

Image Analyst
Image Analyst 2016-1-12
The FAQ shows how to do it and explains why you should not do it: http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by