Maer
Automotive
- Dec 12, 2004
- 1
Hi
I want to create new names for my structure, or if not possible, variables. I have the following problem:
A variable in a for-loop is to be a part in my structure name. This means that the structures chuold be named as; structure1, structure2 and so on.
Is there any way to this and to be able to store any kind of data into these structures?
I have earlier tried to make variables in the same way using the following;¨
for i=1:10 eval(['variable' num2str(i) '=' num2str(i)]); end
but in this case it is not possible to store numerical data in any good way, only strings.
Does anyone have any idea on how to solve this?
Regards Mattias
I want to create new names for my structure, or if not possible, variables. I have the following problem:
A variable in a for-loop is to be a part in my structure name. This means that the structures chuold be named as; structure1, structure2 and so on.
Is there any way to this and to be able to store any kind of data into these structures?
I have earlier tried to make variables in the same way using the following;¨
for i=1:10 eval(['variable' num2str(i) '=' num2str(i)]); end
but in this case it is not possible to store numerical data in any good way, only strings.
Does anyone have any idea on how to solve this?
Regards Mattias