Io ho risolto così, lascio aperta la discussione in caso a qualcuno possa servire:
T_mean_power=zeros(length(timeDaily),1);
for i=1:length(time)
for j=floor(min(T_ext_d)):2:ceil(max(T_ext_d))
if T_ext_d(i)>j-1 && T_ext_d(i)<=j+1
T_mean_power(i)=j;
end
end
end
figure_f2='Boxplot'
fig_f2=figure('Position', [60 60 2*scrsz(3)/3 2*scrsz(4)/3]);
boxplot(Qdot_mean_allday_d,T_mean_power)
xlabel('Temperatura (°C)')
ylabel('Potenza Media (kW)')