Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question on Variable name creation ...

Status
Not open for further replies.

nodalDOF

Mechanical
Joined
Oct 3, 2005
Messages
100
Location
US
Is it possible to create the variable names by concatenating two strings ? something like this...

x='value'
['abc' x]= 10;


so that abcvalue=10



any ideas of creating variable names like this.
 
You can do this using eval. However, if you trawl the archives of CSSM, you'll find many posters suggesting that your problem is better solved using cell arrays.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top