Creating a new variable in a loop automatically. Please help!

2 次查看(过去 30 天)
I need to create a new variable every time the loop occurs. I am pretty new to matlab please help!
I need the variable to change automatically each time the conditions are met and the variable is stored. (Yaxisvarible1, Yaxisvariable2, and so on). Thanks in advance.

采纳的回答

lvn
lvn 2014-4-19
You can use the eval function to create such variables. However this practice is not recommended and can almost always be circumvented by other and better data representation (e.g. vectors/ structures/cells, etc..)

更多回答(1 个)

Azzi Abdelmalek
Azzi Abdelmalek 2014-4-19

类别

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