change your code as the following:
data = [];
for num=START:END
[out1 out2] = some_funstion(input_image);
a = out1+out2;
b = out2-out1;%example
data = [data; a b]; % each row of data will be a and b
end
save('file.mat','data'); % save 'data' in the 'file.mat' file
load('file.mat'); % load 'data' from 'file.mat'.
By the way, in matlab, the comments are followed by '%'