n=5;
for q=1:n
eval(['Tfunct2_',num2str(q)])=importdata('Tfunct2_',num2str(q),'.mat');
assignin{'base','TF',eval(['Tfunct2_',num2str(q)])};
T(1,q)=TF;
end there is error in each line as shown by matlab bt in code which i wrote earlier following lines work properly as:
1. assignin('base', 'PClean',eval(['PClean_',num2str(ii)]));
2. T1=importdata('Tfunct2_1.mat','TFunct');
but as want to make a loop to import and take average of the arrays so i am writing this code.