function createfigure(X1, YMatrix1, YMatrix2, X2, Y1, YMatrix3)
%CREATEFIGURE(X1, YMatrix1, YMatrix2, X2, Y1, YMatrix3)
%  X1:  vector of x data
%  YMATRIX1:  matrix of y data
%  YMATRIX2:  matrix of y data
%  X2:  vector of x data
%  Y1:  vector of y data
%  YMATRIX3:  matrix of y data

%  Auto-generated by MATLAB on 02-Jul-2019 14:01:49

% Create figure
figure('WindowState','maximized','OuterPosition',[-1927 -75 1936 1056]);

% Create subplot
subplot1 = subplot(3,1,1);
hold(subplot1,'on');

% Create multiple lines using matrix input to plot
plot1 = plot(X1,YMatrix1);
set(plot1(1),'DisplayName','$T^{amb}$','Color',[0 0.5 0]);
set(plot1(2),'LineStyle','--','Color',[0 0 0]);

% Create ylabel
ylabel('Temperature (°C)');

% Create title
title('Ambient temperature');

box(subplot1,'on');
% Create legend
legend1 = legend(subplot1,'show');
set(legend1,'Orientation','horizontal','Interpreter','latex',...
    'Location','best');

% Create subplot
subplot2 = subplot(3,1,2);
hold(subplot2,'on');

% Create multiple lines using matrix input to plot
plot2 = plot(X1,YMatrix2);
set(plot2(1),'DisplayName','Generalized','Color',[0.635 0.078 0.184]);
set(plot2(2),'DisplayName','$T^{sp}$','LineStyle','--','Color',[0 0 0]);

% Create plot
plot(X2,Y1,'DisplayName','Standard','LineStyle','--',...
    'Color',[0.466 0.674 0.188]);

% Create ylabel
ylabel('Temperature (°C)');

% Create title
title('Room temperature');

box(subplot2,'on');
% Create legend
legend2 = legend(subplot2,'show');
set(legend2,'Orientation','horizontal','Interpreter','latex',...
    'Location','best');

% Create subplot
subplot3 = subplot(3,1,3);
hold(subplot3,'on');

% Create multiple lines using matrix input to plot
plot3 = plot(X1,YMatrix3,'Color',[0 0 0],'LineStyle','--');
set(plot3(1),'DisplayName','$u_{AC}$','Color',[0.301 0.745 0.933],...
    'LineStyle','-');
set(plot3(2),'DisplayName','$u_{CW}$','Color',[0 0.447 0.741],...
    'LineStyle','-');
set(plot3(3),'DisplayName','$u_{HW}$','Color',[0.929 0.694 0.125],...
    'LineStyle','-');
set(plot3(4),'DisplayName','$u_{EH}$','Color',[1 0 0],'LineStyle','-');

% Create ylabel
ylabel('u_i (-)');

% Create xlabel
xlabel('Time (min)');

% Create title
title('Manipulated variables');

box(subplot3,'on');
% Create legend
legend3 = legend(subplot3,'show');
set(legend3,'Orientation','horizontal','Interpreter','latex',...
    'Location','best');

