num = 1; -------> 475current_file = Test_1; -----------------> test_475 (Table of name 'Test_1' in workspace)rate = height(current_file);for i=1:rate rel = current_file.S; vel = current_file.E; time = current_file.t; Target_v{i,1} = rel(i) + vel(i); if i == rate T = array2table(Target_v); C = [current_file(:,1:3) T current_file(:,4:45)] eval(['Dataset_' num2str(num) '= C']); Target_v= [ ]; endend
I want to load multiple variables that are in workspace in a for loop add a column to each one of them and save them with another name or export them to excel. How can I do this?
Best Answer