Thanks! it worked
But do you have any other way of representing it ?
I'm not sure what your real data looks like. If they are all strings, then if they are the same length you could do a char array:
octave:1> a = ['abc'; 'def'; 'ghi']
a =
abc
def
ghi
octave:2> a(1)
ans = a
octave:3> a(1,:)
ans = abc
octave:4> a(3,:)
ans = ghi
if you need more flexibility, you could use a cell array:
octave:7> a = {'abc'; 'defghi'; 'jklmnop'}
a =
{
[1,1] = abc
[2,1] = defghi
[3,1] = jklmnop
}
octave:8> a{1}
ans = abc
octave:9> a{2}
ans = defghi
octave:10> a{3}
ans = jklmnop
those could then be indexed in a loop.