%soglovpr.m
close all;fclose all;clear all;

load /home/dallison/nbp0103vprdata;

fid1=fopen('myout.txt','w');

%for i=1:length(variables)
%    fprintf(fid1,'%-7s  ',variables(i,:));        
%end

%Problem here is no matter what my format statement says, I have to load in 25 columns to get all the words.  Then all the
%columns are printed.

for i=1:15
    fprintf(fid1,'%26s\t%16s\t%15s\t%26s\t%8s\t%21s\t%20s\t%22s\t%16s\t%14s\t%24s\t%17s\t%17s\t%15s\t',variables(i,1:26));
%   fprintf(fid1,'%9s\t%9s\t%10s\t%3s\t',variables(i,1:25));
end

fclose(fid1);

fid1=fopen('myout.txt','a'); 

fprintf(fid1,'\n');

for i=1:20    
    fprintf(fid1,'%8.4f\t%7.4f\t%7.4f\t%7.3f\t%6.3f\t%6.3f\t%6.3f\t%5.3f\t%5.3f\t%8.4f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t%4.2f\t %4.2f\t',data(i,:));
    fprintf(fid1,'\n');
end

fclose(fid1);