function [ sim_param , data_meas] = sim_input( T_vz, simtime, data_meas, T_out, topeni, chlazeni, osvetleni, ventil, ventilator, Zvlhcovac_ovladani, Odvlhcovac_ovladani )
%UNTITLED4 Summary of this function goes here
%   Detailed explanation goes here

time = (0:T_vz:simtime)';
%%   teplota okoli
if T_out > 0
    Tout_meas = [time zeros(size(time))+273.15+T_out];
else
    Tout_meas = [time data_meas(:, 6)+273.15];
end

T_komora_merena = [time data_meas(:, 2)+273.15];
T_vymenik_merena = [time data_meas(:, 3)+273.15];


%%   hmotnostni prutok chladici kapaliny

Qm_Cirk1_Chlazeni = makevector(time, chlazeni);

%%   Vykon topneho telesa

P_Cirk1_topne_teleso = makevector(time, topeni);

%%   hmotnostni prutok chladici kapaliny
% P_LED = [time zeros(size(time))];
% 
% if (osvetleni{1} ~= 0) && (osvetleni{3} ~= 0) && (osvetleni{2} < osvetleni{3})
%     indexstart = find(time >= osvetleni{2});
%     indexstart = indexstart(1);
%     indexstop = find(time >= osvetleni{3});
%     indexstop = indexstop(1);
%     P_LED(indexstart:indexstop, 2) = osvetleni{1};
% end

P_LED = makevector(time, osvetleni);

Ventil_poloha = makevector(time, ventil);

%%  vynuluje namerene hodnoty z cidel, pokkud nebyly pouzity pri mereni
if T_out == 0
    data_meas(:, 4) = zeros(size(time));
    data_meas(:, 5) = zeros(size(time));
    data_meas(:, 6) = zeros(size(time));
end
%%  Teplota vody v nadrzi
T_Cirk1_Chlazeni_zasobnik = [time zeros(size(time))];
T_Cirk1_Chlazeni_zasobnik(:, 2) = data_meas(:, 7)+273.15;

%%   chod ventilatoru

Ventilator_chod = makevector(time, ventilator);

%%  Zvlhcovac
Zvlhcovac_ovladani = makevector(time, Zvlhcovac_ovladani);

%%  Zvlhcovac
Odvlhcovac_ovladani = makevector(time, Odvlhcovac_ovladani);

%%   Vystup
sim_param = {Qm_Cirk1_Chlazeni, P_Cirk1_topne_teleso, Tout_meas, P_LED, T_Cirk1_Chlazeni_zasobnik, Ventil_poloha, Ventilator_chod, Zvlhcovac_ovladani, Odvlhcovac_ovladani, T_komora_merena, T_vymenik_merena};


end

