%% =========================================================================== % Copyright (C) 1998,99 by Telia Research AB, Lulea, Sweden; All rights reserved. % % Description : Main simulation program, example of local defintions % % File : ExMain.m % Project : FSAN duplex model % Author(s) : Tomas Nordstrom (Tomas.B.Nordstrom@Telia.se) % : % % CVS: $Id: ExMain.m,v 1.15 1999/03/31 13:15:23 tono Exp $ %% =========================================================================== %% =========================================================================== % Change History % 1998-11-13 (ToNo) Created % 1998-12-21 (ToNo) Updated to get in sync with uiMain % 1998-01-07 (ToNo) Removed modem under test % 1998-01-14 (ToNo) Updated to get in sync with uiMain % 1999-02-05 (DaB) Updated to fit new param structure % 1999-02-25 (ToNo) Generlized list (tfplist) handling % 1999-02-26 (ToNo) Split out definitions into userDefinitionsExample1 % 1999-03-25 (ToNo) Restructured the source (moved into subdir xdslcomm) %% =========================================================================== global ex; global res; addpath xdslcomm; % Set up default experiment structures ex.param = setupParam; % Parameters ex.ttlist = setupTTstructure; % Traffic & Topology ex.tfplist = setupTFplan; % Time & Freq. plans userDefinitionsExample1; % Show traffic and topology structure figure(1); plotTTstructure(ex.tt); % Show PSD masks for VDSL modem tfplan = getList(ex.tfplist,vdslDuplex); figure(2); fax.min=1e3; fax.max=12e6; plotTFplan(tfplan,'Lin',fax); drawnow; % Show it now % Evaluate this experiment result = evalExperiment; % Show the result from the experiment (Note: Mixed ADSL and VDSL results) format compact [bitrate_LT, bitrate_NT]=calcFSANresult(ex,result); sprintf('LT Rates') bitrate_LT sprintf('NT Rates') bitrate_NT sprintf('Ratio') bitrate_NT./bitrate_LT % Plot the results from experiment for current=1:length(result), figure; tmp_str=sprintf('FSAN Duplex Simulation Result, Modem %d',current); set(gcf,'NumberTitle','off','Name',tmp_str); % Plot the LT side subplot(211) plotResult(ex,result,current,'LT'); % Plot the NT side subplot(212) plotResult(ex,result,current,'NT'); end % or do uiResults(ex,result) to get the gui interface for the results