clear all
load responsdata

% xA
N=[n(1);sum(n(1:2));sum(n(1:3));sum(n(1:4));sum(n(1:5));sum(n(1:6));...
    sum(n(1:7));sum(n(1:8));sum(n(1:9));sum(n(1:10));sum(n(1:11));sum(n(1:12));...
    sum(n(1:13));sum(n(1:14));sum(n(1:15));sum(n(1:16));sum(n(1:17));sum(n(1:18));...
    sum(n(1:19));sum(n(1:20))];

figure(1)
plot(t(1:N(1)),y(1:N(1),1),t(N(1)+1:N(2)),y(N(1)+1:N(2),1),...
    t(N(2)+1:N(3)),y(N(2)+1:N(3),1),t(N(3)+1:N(4)),y(N(3)+1:N(4),1),...
    t(N(4)+1:N(5)),y(N(4)+1:N(5),1),t(N(5)+1:N(6)),y(N(5)+1:N(6),1),...
    t(N(6)+1:N(7)),y(N(6)+1:N(7),1),t(N(7)+1:N(8)),y(N(7)+1:N(8),1),...
    t(N(8)+1:N(9)),y(N(8)+1:N(9),1),t(N(9)+1:N(10)),y(N(9)+1:N(10),1),...
    t(N(10)+1:N(11)),y(N(10)+1:N(11),1),t(N(11)+1:N(12)),y(N(11)+1:N(12),1),...
    t(N(12)+1:N(13)),y(N(12)+1:N(13),1),t(N(13)+1:N(14)),y(N(13)+1:N(14),1),...
    t(N(14)+1:N(15)),y(N(14)+1:N(15),1),t(N(15)+1:N(16)),y(N(15)+1:N(16),1),...
    t(N(16)+1:N(17)),y(N(16)+1:N(17),1),t(N(17)+1:N(18)),y(N(17)+1:N(18),1),...
    t(N(18)+1:N(19)),y(N(18)+1:N(19),1),t(N(19)+1:N(20)),y(N(19)+1:N(20),1))
grid
title('Molfraksjon A i D, ved ulike temp. reguleringer')

figure(2)
plot(t(1:N(1)),y(1:N(1),2),t(N(1)+1:N(2)),y(N(1)+1:N(2),2),...
    t(N(2)+1:N(3)),y(N(2)+1:N(3),2),t(N(3)+1:N(4)),y(N(3)+1:N(4),2),...
    t(N(4)+1:N(5)),y(N(4)+1:N(5),2),t(N(5)+1:N(6)),y(N(5)+1:N(6),2),...
    t(N(6)+1:N(7)),y(N(6)+1:N(7),2),t(N(7)+1:N(8)),y(N(7)+1:N(8),2),...
    t(N(8)+1:N(9)),y(N(8)+1:N(9),2),t(N(9)+1:N(10)),y(N(9)+1:N(10),2),...
    t(N(10)+1:N(11)),y(N(10)+1:N(11),2),t(N(11)+1:N(12)),y(N(11)+1:N(12),2),...
    t(N(12)+1:N(13)),y(N(12)+1:N(13),2),t(N(13)+1:N(14)),y(N(13)+1:N(14),2),...
    t(N(14)+1:N(15)),y(N(14)+1:N(15),2),t(N(15)+1:N(16)),y(N(15)+1:N(16),2),...
    t(N(16)+1:N(17)),y(N(16)+1:N(17),2),t(N(17)+1:N(18)),y(N(17)+1:N(18),2),...
    t(N(18)+1:N(19)),y(N(18)+1:N(19),2),t(N(19)+1:N(20)),y(N(19)+1:N(20),2))
grid
title('Molfraksjon C i B, ved ulike temp. reguleringer')

figure(3)
plot(t(1:N(1)),y(1:N(1),3),t(N(1)+1:N(2)),y(N(1)+1:N(2),3),...
    t(N(2)+1:N(3)),y(N(2)+1:N(3),3),t(N(3)+1:N(4)),y(N(3)+1:N(4),3),...
    t(N(4)+1:N(5)),y(N(4)+1:N(5),3),t(N(5)+1:N(6)),y(N(5)+1:N(6),3),...
    t(N(6)+1:N(7)),y(N(6)+1:N(7),3),t(N(7)+1:N(8)),y(N(7)+1:N(8),3),...
    t(N(8)+1:N(9)),y(N(8)+1:N(9),3),t(N(9)+1:N(10)),y(N(9)+1:N(10),3),...
    t(N(10)+1:N(11)),y(N(10)+1:N(11),3),t(N(11)+1:N(12)),y(N(11)+1:N(12),3),...
    t(N(12)+1:N(13)),y(N(12)+1:N(13),3),t(N(13)+1:N(14)),y(N(13)+1:N(14),3),...
    t(N(14)+1:N(15)),y(N(14)+1:N(15),3),t(N(15)+1:N(16)),y(N(15)+1:N(16),3),...
    t(N(16)+1:N(17)),y(N(16)+1:N(17),3),t(N(17)+1:N(18)),y(N(17)+1:N(18),3),...
    t(N(18)+1:N(19)),y(N(18)+1:N(19),3),t(N(19)+1:N(20)),y(N(19)+1:N(20),3))
grid
title('Molfraksjon B i S, ved ulike temp. reguleringer')
