Hello,
I'd like to generate a list of variable names where the output looks as follows:
# TB1W082A# TB1W083A# TB1W084A# TB1W08AA# TB1W08BA# TB1W08CA# TB1W092A# TB1W093A# TB1W094A# TB1W09AA# TB1W09BA# TB1W09CA
Here is the code I'm using:
% alph=('A':'C');
% for n1 = 8:9
for n2 = 1:3 for a = 1:3 num{n2} = ['TB1W' num2str(n1) num2str(n2+1) 'A']; str{a} = ['TB1W' num2str(n1) alph(a) 'A']; end end endclear a alpha n1 n2
I tried creating two variables; num and str. One was meant for the numeric portion and the other for the alphabetic portion. However, this is the output I get:
num =
- TB1W092A
- TB1W093A
- TB1W094A
str =
- TB1W09AA
- TB1W09BA
- TB1W09CA
Any suggestions?
Best Answer