Home > reduc > load > readTemplateDatabase.m

readTemplateDatabase

PURPOSE ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

SYNOPSIS ^

function [mjdList templates] = readTemplateDatabase()

DESCRIPTION ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 function [] = readTemplateDatabase()


   I/O:

   MAS -- 24-April-2012

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [mjdList templates] = readTemplateDatabase()
0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0003 %
0004 % function [] = readTemplateDatabase()
0005 %
0006 %
0007 %   I/O:
0008 %
0009 %   MAS -- 24-April-2012
0010 %
0011 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0012 
0013 fprintf('\nReading in the template database...\n\n');
0014 
0015 [home,installeddir] = where_am_i();
0016 
0017 templateDatabase = [home '/' installeddir '/constants/loadTemplateDatabase.txt'];
0018 
0019 
0020 % Read it in.
0021 c = importdata(templateDatabase,' ');
0022 
0023 mjdList = unique(c(:,1));
0024 
0025 n_temp = length(mjdList);
0026 n_phase = size(c,1) / n_temp;
0027 
0028 templates = zeros(n_phase, n_temp, 20);
0029 
0030 for k=1:20
0031     templates(:,:,k) = reshape(c(:,k+1),n_phase,n_temp);
0032 end
0033 
0034 end

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005