function [ opt_param ] = makeopt_param( measurename, fmin_param_names, kritname)
%UNTITLED4 Summary of this function goes here
%   Detailed explanation goes here
%%  Nacteni dat
    filename = strcat('Data/', measurename,'.xlsx');
    
    if exist(strcat('SimData/', measurename, '.mat'),'file') == 2;
        load(strcat('SimData/', measurename, '.mat'));
        [data_meas, data_meas_title, T_vz, meastime] = load_data(filename, endtime);
    else 
        opt_param = -1;
        return
    end
    %%  vytvoreni vstupnich vektoru
    [ sim_param , data_meas] = sim_input( T_vz, simtime, data_meas, T_out, topeni, chlazeni, osvetleni, ventil, ventilator, Zvlhcovac_ovladani, Odvlhcovac_ovladani);

    %%  vytvoreni opt_param
    opt_param = {T_vz, simtime, sim_param, data_meas, fmin_param_names, kritname, data_meas_title};
end

