Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Using Substitution when Naming a Vector

Status
Not open for further replies.

Stringmaker

Mechanical
Mar 18, 2005
513
0
0
US
I have a vector:

c = [20 25 27]'

and want to name another vector by appending the name with an element from the vector c. For instance, I want to name a vector:

omega25 =

the name consists of the base 'omega' and the second element of vector c, c(2). How can one do this substitution? I've been trying to use the genvarname function to no avail so far.

Thank you,
-Brian
 
Replies continue below

Recommended for you

Status
Not open for further replies.
Back
Top