tic
clc;
clear all;
close all;


load LOG_DATA_11_2494_mod.mat;
U=[];
v=[ 1 1 0 1 0];
num_sign_div=sum(v);  % sommo gli 1 di v per sapere i tipi di segnali che prendo
l=length(log);

Usize=size(U);
%creazione della U

Colone_U=[];
for ii=1:num_sign_div
    Colone_U=[ U , 1:1:Usize(2)/num_sign_div  ];
end



if v(1)==1;    
    for i=1:l;
        U = [ U , log(i).temperature];
    end
    for jj=1:Usize(2)/num_sign_div
        Colone_U(2,jj)
    end
end
if v(2)==1;    
    for i=1:l;
        U = [ U , log(i).humidity];

    end
end
if v(3)==1;
    for i=1:l;
        U = [ U , log(i).humidity_true];
    end
end
if v(4)==1;
    for i=1:l;
        U = [ U , log(i).activeRadiation];

    end
end
if v(5)==1;    
    for i=1:l;
        U = [ U , log(i).totalRadiation];
    end
end

% Ts=60*8;

Usize=size(U);

start_index_id=1;
stop_index_id=1000;


%ciclo temperatura
for i=1:Usize(2)/num_sign_div
    
    Dati(i).t.y=U(:,i);
    Dati(i).h.y=U(:,Usize(2)/num_sign_div+i);
    
    Dati(i).t.Udati=cancel_y_from_U(U,i);
    Dati(i).t.Colone_U=cancel_y_from_U(Colone_U,i);
    
    Dati(i).h.Udati=cancel_y_from_U(U,Usize(2)/num_sign_div+i);
    Dati(i).h.Colone_U=cancel_y_from_U(Colone_U,Usize(2)/num_sign_div+i);

    Dati(i).name_of_y=log(i).name;
    
end

% strg_n=num2str(n);
% strg_p=num2str(p);
% 
% strg_str_idx=num2str(start_index_id);
% strg_stp_idx=num2str(stop_index_id);
% strg_v=[];
% 
% for i=1:length(v)
%     tmp=num2str(v(i));
%     strg_v=[ strg_v tmp ];
% end

str=['Dati_MatriceTTT'];
save(str,'Dati');


