56 views (last 30 days)
Show older comments
AYAH on 14 Feb 2012
hello every body , who know how to name variables dynamically such as X1, x2,X3,...Xn in for loop
Benjamin Schwabe on 14 Feb 2012
why do you want to do this, you really might want to use a vector with X(1),X(2),...,X(10), they are dynamic in MatLab, so there is nothing to worry about this. And cases are really rare, in which you want to do what you'd like to have...
However, you can do it by using assignin, e.g. like that:
More Answers (1)
Walter Roberson on 14 Feb 2012
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!