Dynamic variables matlab

試著忘記壹切 提交于 2019-11-29 16:18:17

You can use eval().

But I recommend not doing this at all. Use a multidimensional array, rather than lots of variables with slightly different names.

To follow on from Oli's suggestions, see this piece of the MATLAB FAQ:

http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F

which shows how to use structures and cell arrays as an alternative to eval.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!