%script for reading and plotting the excel results

%results=xlsread('M:\Diplom\kaibel_test_results_working_prefrac_split.xls',
%'sheet1','b7:bf35');


%Extracting results from the excel worksheet:
reflux=xlsread('M:\Diplom\kaibel_test_results_working_prefrac_split.xls','sheet1','b7:b35');
heatduty=xlsread('M:\Diplom\kaibel_test_results_working_prefrac_split.xls','sheet1','as7:as35');
prodstreamD=xlsread('M:\Diplom\kaibel_test_results_working_prefrac_split.xls','sheet1','at7:aw35');
prodstreamS1=xlsread('M:\Diplom\kaibel_test_results_working_prefrac_split.xls','sheet1','ax7:ba35');
prodstreamS2=xlsread('M:\Diplom\kaibel_test_results_working_prefrac_split.xls','sheet1','bb7:be35');
prodstreamB=xlsread('M:\Diplom\kaibel_test_results_working_prefrac_split.xls','sheet1','bf7:bi35');
prodstream_frac_sum=xlsread('M:\Diplom\kaibel_test_results_working_prefrac_split.xls','sheet1','bu7:bu35');

scale=1;
prodfrac=1;
scale2=0;

if scale==1;
    heatduty = heatduty./1e6;
end
    
if prodfrac==1;
    prodstreamD = prodstreamD(:,1);
    prodstreamS1 = prodstreamS1(:,2);
    prodstreamS2 = prodstreamS2(:,3);
    prodstreamB = prodstreamB(:,4);
end

if scale2==1;
    prodstream_frac_sum = prodstream_frac_sum./4;
end



figure
hold on;
plot(reflux,heatduty,'r'), %legend('Boil-up');
%plot(reflux,prodstreamD,'b:'); %legend('Stream D');
%plot(reflux,prodstreamS1,'k:'); %legend('Stream S1');
%plot(reflux,prodstreamS2,'g:'); %legend('Stream S2');
%plot(reflux,prodstreamB,'r:'); %legend('Stream B');
%legend('Stream D','Stream S1','Stream S2','Stream B');
plot(reflux,prodstream_frac_sum,'k'), %legend('Sum of product fractions');
legend('Boil-up','Sum of product fractions')
hold off;


