%plot_results_cat load(fullfile(pathname,'results_cat_UE.mat')); in = 0; %plotwrtdistanceCalc; [dist, dist_travelled] = calc_dist([gps_data_cat.latitude],[gps_data_cat.longitude],mm); max_dist = ceil(max(dist)); speed = [gps_data_cat.speed]; time = [gps_data_cat.timestamp]; timebase = 1:length(time); timebase2 = time-time(find(~isnan(time),1)); timebase_cuts = find(diff(timebase2)>60*60*8); %% set throughput to 0 when UE was not synched UE_connected = all(reshape(UE_mode_cat,100,[])==3,1); UE_synched = all(reshape(UE_mode_cat,100,[])>0,1); vars = whos('rateps*'); nn = {vars.name}; for n = 1:length(nn) eval([nn{n} '(~UE_synched) = 0;']); end K_fac_cat = reshape(K_fac_cat,4,[]); K_fac_cat(:,~UE_synched) = nan; % %% get real throughput from modem % dlsch_error = double([1 diff([minestimates_cat.dlsch_errors])]); % rateps_modem = (1-dlsch_error) .* double([minestimates_cat.tbs]); % rateps_modem([minestimates.UE_mode]~=3) = 0; % rateps_modem = sum(reshape(rateps_modem,100,[]),1)*6; % % dlsch_mcs = [minestimates_cat.mcs]; % mod_order = zeros(size(dlsch_mcs)); % mod_order(dlsch_mcs<10) = 2; % mod_order(dlsch_mcs>=10 & dlsch_mcs<17) = 4; % mod_order(dlsch_mcs>=17) = 6; % rateps_uncoded_modem = 2400*mod_order; % rateps_uncoded_modem([minestimates.UE_mode]~=3) = 0; % rateps_uncoded_modem = sum(reshape(rateps_uncoded_modem,100,[]),1)*6; %% plot K-factor in=in+1; h_fig = figure(in); hold off plot_gps_coordinates(mm, [gps_data_cat.longitude], [gps_data_cat.latitude], 10*log10(mean(K_fac_cat,1))); title('K_factor [dB]') saveas(h_fig,fullfile(pathname,'K_factor_gps.jpg'),'jpg'); in=in+1; h_fig = figure(in); hold off plot(10*log10(mean(K_fac_cat,1))); xlabel('Time [sec]') ylabel('K_factor [dB]') plot(timebase_cuts,0,'k^','Markersize',10,'Linewidth',2) saveas(h_fig,fullfile(pathname,'K_factor_time.eps'),'epsc2'); %% plot coded throughput as CDFs in = in+1; h_fig = figure(in); hold off colors = {'b','g','r','c','m','y','k','b--','g--','r--','c--','m--','y--','k--'}; legend_str = {}; ni=1; for n = 1:length(nn) si = strfind(nn{n},'supportedQam'); if si eval(['[f,x] = ecdf(scale_ideal_tp(' nn{n} '));']); plot(x,f,colors{ni},'Linewidth',2); hold on legend_tmp = nn{n}; legend_tmp(si:si+10) = []; legend_str{ni} = legend_tmp; ni=ni+1; end end % [f,x] = ecdf(rateps_modem); % plot(x,f,colors{ni},'Linewidth',2); % legend_str{ni} = 'rateps_modem'; % ni=ni+1; legend(legend_str,'Interpreter','none','Location','SouthOutside'); title('DL Throughput CDF') xlabel('Throughput [bps]') ylabel('P(x