Commit 36d8a9bb by Martin Hudlicka

### Updated code

parent 1cdb16d1
 ... ... @@ -28,7 +28,7 @@ function [G_OPT,EVM] = F_EVM_Computation_on_Symbols(params,Symb,Sideal) G_OPT = CC / AC ; % Gsymb = CC / ACideal; fprintf('Optimum gain on symbols for EVM computation\n'); fprintf(' amplitude = %8.6f phase = %8.2f �\n',... fprintf(' amplitude = %8.6f phase = %8.2f °\n',... abs(G_OPT), angle(G_OPT) * 180 / pi ); % EVM Calculation same as the single-carrier case Section 5.1.2.5 ... ... @@ -42,7 +42,7 @@ function [G_OPT,EVM] = F_EVM_Computation_on_Symbols(params,Symb,Sideal) % cos2 = real(CC*conj(CC) / AC / ACideal); % if structGlobal.printdebug % fprintf('Angle between measured symbols and reference symbols\n'); % fprintf(' cos2 = %8.6f angle = %10.6f �\n',cos2,acosd(sqrt(cos2))); % fprintf(' cos2 = %8.6f angle = %10.6f °\n',cos2,acosd(sqrt(cos2))); % end % EVM = sqrt(1/cos2-1); % = tangent of angle ... ... @@ -54,20 +54,7 @@ function [G_OPT,EVM] = F_EVM_Computation_on_Symbols(params,Symb,Sideal) Symb = Symb * G_OPT * params.Ac; Sideal = Sideal * params.Ac; if structGlobal.tracedebug >0 figure1 = figure(25); clf; grid on; box on; hold on; axis('square'); axis([-params.N/2 params.N/2 -params.N/2 params.N/2]); set(gca,'XTick',(-params.N/2:1:params.N/2)); set(gca,'YTick',(-params.N/2:1:params.N/2)); title('Ideal and measured symbols constellations'); plot(real(Symb(1:params.Nc*params.NS)),imag(Symb(1:params.Nc*params.NS)),'ro') plot(real(Sideal(1:params.Nc*params.NS)),imag(Sideal(1:params.Nc*params.NS)),'k*'); plot(params.Ac*cos(pi*(0:360)/180),params.Ac*sin(pi*(0:360)/180),'-b'); % Saving figure as graphic file in current directory (plot must still be present in MATLAB plot window) stri_fig = fullfile(structGlobal.evm_results_folder,strcat(structGlobal.filename,'_baseline.jpg')); % Change file naming to save as needed set(figure1,'PaperPositionMode','auto'); print(figure1,stri_fig,'-djpeg','-r0'); F_Plot_Constellation_Diagram_OFDM(Sideal,Symb,params); end end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!