Arman Akbarian
UNIVERSITY OF BRITISH COLUMBIA
PHYSICS & ASTRONOMY DEPT.

format long
% Interpolating a6 a9 a12 on the grid points of al
% Saving the difference in standard ascii data file
% all of the data are x-y 1-D data
a6=load('a_crit_l6_scaled');
a9=load('a_crit_l9_scaled');
a12=load('a_crit_l12_scaled');
al=load('a_l_scaled');

al_x=al(:,1);
al_y=al(:,2);

a6_x=a6(:,1);
a6_y=a6(:,2);

a9_x=a9(:,1);
a9_y=a9(:,2);

a12_x=a12(:,1);
a12_y=a12(:,2);

%This is the interpolation routine:
a6_y_int = interp1(a6_x,a6_y,al_x);
a9_y_int = interp1(a9_x,a9_y,al_x);
a12_y_int = interp1(a12_x,a12_y,al_x);

a6_diff = a6_y_int - al_y;
a9_diff = a9_y_int - al_y;
a12_diff = a12_y_int - al_y;

a6_int_diff = [al_x , a6_diff];
a9_int_diff = [al_x , a9_diff];
a12_int_diff = [al_x , a12_diff];

save_precision(32);
save("-ascii","a6_diff","a6_int_diff");
save("-ascii","a9_diff","a9_int_diff");
save("-ascii","a12_diff","a12_int_diff");


last update: Wed May 11, 2016