IEEE.org     |     IEEE Xplore Digital Library     |     IEEE Standards     |     IEEE Spectrum     |     More Sites

Commit 41c4ff47 authored by Martin Hudlicka's avatar Martin Hudlicka
Browse files

Updated code

parent d3cc8cbe
function [evm_results_folder,filename,ideal_file,impaired_file] = F_UserInputs_Rx()
function F_UserInputs_Rx()
global structGlobal
% Select the folder where these programs reside
uiwait(msgbox({'In order for the program to run correctly,'...
......@@ -9,7 +11,7 @@ function [evm_results_folder,filename,ideal_file,impaired_file] = F_UserInputs_R
cd(program_folder);
% Select a folder to save the EVM results based on user input');
evm_results_folder = uigetdir(pwd,'Select a folder to save EVM calculation results');
structGlobal.evm_results_folder = uigetdir(pwd,'Select a folder to save EVM calculation results');
% Read in ASCII Baseband Reference Waveform file
disp('__________________________________________________________________');
......@@ -20,36 +22,60 @@ function [evm_results_folder,filename,ideal_file,impaired_file] = F_UserInputs_R
% Read in ASCII Baseband Ideal Waveform file
[filename,path] = uigetfile('P1765 Reference Waveforms\original_OFDMideal_bb.txt','Select the ideal baseband signal text file');
ideal_file = fullfile(path,filename);
structGlobal.ideal_file = fullfile(path,filename);
% Read in ASCII Baseband Impaired Waveform file
[filename,path] = uigetfile('P1765 Reference Waveforms\originalOFDMimpaired_echo_bb.txt','Select the impaired baseband signal text file');
impaired_file = fullfile(path,filename);
[filename,path] = uigetfile('P1765 Reference Waveforms\Waveform_OFDM_SIS00_BB.txt','Select the impaired baseband signal text file');
structGlobal.impaired_file = fullfile(path,filename);
% Extract the file extension for default filenaming convention
[~,~,ext] = fileparts(filename);
% Enter filename to use for saving results and constellation diagram or
% choose to use the default name (which is same as measured filename)
% Find the starting index of SIS in the filename for default filenaming convention
% SIS = Signal Impairment Sets.
% The filenames have SIS followed by two digits 00 through 11
SISmn_index_start = strfind(filename,'SIS');
SISmn_index_end = SISmn_index_start + 4;
% Extract the SISmn from the waveform file
structGlobal.SISmn = filename(SISmn_index_start:SISmn_index_end);
%% Enter filename to use for saving results or choose to use the default name
list = {'DEFAULT filename','CUSTOM filename'};
[filename_choice,~] = listdlg('PromptString',...
'Would you like to set a default or custom filename?',...
{'Would you like to set a default or custom filename','for EVM results?'},...
'SelectionMode','single','ListSize',[250,100],'ListString',list);
if filename_choice == 1
filename = strcat(filename(1:end-length(ext)),'_calc-results');
structGlobal.filename_results = strcat('EVM_OFDM_',structGlobal.SISmn);
else
prompt = {'Enter filename (without extension):'};
dlgtitle = 'Custom filename';
dims = [1 50];
definput = {'evm_results_file'};
response = inputdlg(prompt,dlgtitle,dims,definput);
filename = response{1};
structGlobal.filename_results = response{1};
end
%% Enter filename to use for saving constellation diagram or choose to use the default name
list = {'DEFAULT filename','CUSTOM filename'};
[filename_choice,~] = listdlg('PromptString',...
{'Would you like to set a default or custom filename','for constellation diagram?'},...
'SelectionMode','single','ListSize',[250,100],'ListString',list);
if filename_choice == 1
structGlobal.filename_constellation = strcat('Constellation_OFDM_',structGlobal.SISmn);
else
prompt = {'Enter filename (without extension):'};
dlgtitle = 'Custom filename';
dims = [1 50];
definput = {'constellation_diagram_file'};
response = inputdlg(prompt,dlgtitle,dims,definput);
structGlobal.filename_constellation = response{1};
end
disp(['EVM results will be saved in the following folder: ',evm_results_folder]);
disp(['Filename root for storing the EVM results: ',filename]);
disp(['EVM results will be saved in the following folder: ',structGlobal.evm_results_folder]);
disp(['Filename for the storing the EVM results: ',structGlobal.filename_results]);
disp(['Filename for the saving the constellation diagram: ',structGlobal.filename_constellation]);
disp('__________________________________________________________________');
end
\ No newline at end of file
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment