from CefSplitter by Ben Witvliet
CEF 2.0 multiscan splitter (ITU-R SM.1809)

A_DEMO_OF_CefSplitter.m
%------------------------------------------------------------------------%
%  Program   : DEMONSTRATION PROGRAM of the CefSplitter function (v1.00) %
%------------------------------------------------------------------------%
%  Purpose   : To demonstrate the use of the CEF Splitter function.      %
%                                                                        %
%              When run, this program loads a measurement file written   %
%              in the ITU recommended "Common Exchange Format V2.0".     %
%              If the file is indeed a multiple scan file, it will be    %
%              split into N single scan files.                           %
%                                                                        %
%              This may be useful when data is collected using the       %
%              multiple scan option, but the user prefers to store his   %
%              bandscans per frequency band.                             %
%------------------------------------------------------------------------%
%  MatLab code version:  7.3 [R2006b]                                    %
%------------------------------------------------------------------------%
%  External functions used: Cef2Mat (v1.06)                              %
%------------------------------------------------------------------------%
%  Creation / modification history:                                      %
%  2008-08-25 - v1.00 - B.A.Witvliet - creation                          %
%------------------------------------------------------------------------%
%  Conventions:                                                          %
%  - Every new author adds to the modification history, but does never   %
%    erase names of earlier contributors.                                %
%  - Arrays start with a capitol letter, single variables and single     %
%    variables don't.                                                    %
%  - Main program names are all capitals, functions names only start     %
%    with a capital.                                                     %
%  - Subprograms are always functions, not scripts.                      %
%  - Global variables are avoided.                                       %
%  - This script may be used freely as long as the author is given       %
%    proper credit.                                                      %
%------------------------------------------------------------------------%

clear;      %clear workspace (memory)
clc;        %clear command window (default I/O screen)
close all;  %close graphic figures if any


% ----------------------------------
% FILENAME (select for testing)
% ----------------------------------
filename='Demo_CEF2.0_multi_scan_file';


% -----------------------------
% SOURCE DIRECTORY
% -----------------------------
rootdir=pwd;      % Directory at which programs and functions are located. Here current directory is used.
datadir=rootdir;  % Directory at which data files are located. Choose at will. 


% ----------------------------------
% SPLIT MULTISCAN CEF 2.0 FILE
% ----------------------------------
disp('Splitting multiscan data file');
tic;
[err,err_msg]=CefSplitter(filename,datadir); 
toc;
disp(['Result: ' err_msg]);
disp(' ');

Contact us at files@mathworks.com