I have a structure array like the below
Test{1}.a = [1; 2; 3];Test{1}.b = [7; 3; 22];Test{1}.c = [4; 9; 22];...
If I have a variable (Var) that can be either a, or b, or c, …
If Ind == 1; Var = 'a';elseif Ind == 2 Var = 'b';elseif Ind == 3 Var = 'c';end
How do I specify Test{1}.Var, so that when Ind == 1, it will be Test{1}.a, and so on?
Many thanks!
Best Answer