I might neither fully have understood your code nor the title of the question. Nevertheless, I think this is a better approach.
%%
data(2) = Data_load( Second_file_Data );
data(1) = Data_load( First_file_Data );
%%
pc = PlotsClass;
pc.plot_Column1_vs_Column2( data )
where
classdef Data_load
properties
Column1
Column2
end
methods
function obj = Data_load(Data)
if nargin > 0
obj.Column1 = Data(:,1);
obj.Column2 = Data(:,2);
end
end
end
end
and
classdef PlotsClass < handle
methods
function plot_Column1_vs_Column2( this, data_obj )
figure(1)
hold on
for jj = 1 : length( data_obj )
plot( data_obj(jj).Column1, data_obj(jj).Collumn2 );
end
hold off
end
end
end