-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathspektrCompound2C.m
51 lines (48 loc) · 1.79 KB
/
spektrCompound2C.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
function rowNumber = spektrCompound2C(compound)
%%**************************************************************************
%% System name: SPEKTR
%% Module name: spektrCompound2C.m
%% Version number: 1
%% Revision number: 00
%% Revision date: 15-Mar-2004
%%
%% 2016 (C) Copyright by Jeffrey H. Siewerdsen.
%% I-STAR Lab
%% Johns Hopkins University
%%
%% Usage: rowNumber = spektrCompound2C(compound)
%%
%% Inputs:
%% 'compound' - string containing one of the ACRP compounds
%%
%% Outputs:
%% 'rowNumber' - integer index assigned to compound
%%
%% Description:
%% The function of this method is to return the row of a desired
%% compound for the list of compound densities in density_compounds (.mat
%% file)
%%
%% Notes:
%%
%%*************************************************************************
%% References:
%%
%%*************************************************************************
%% Revision History
%% 0.000 2003 05 01 AW Initial code
%% 1.000 2004 03 15 DJM Initial released version
%%*************************************************************************
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% PARAMETERS
% Filename for matlab file containing the list of compounds
Filename_CompoundList='spektrCompoundList.m';
%%% ... in mat database for density of elements and compounds
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Access periodic table spreadsheet from " periodic_table.m "
data = textread(Filename_CompoundList,'%s\r'); %abbrev. of the elements & atomic #'s are stored here
if isstrprop(compound(1), 'lower')
compound(1) = upper(compound(1));
end
rowNumber = strmatch(compound,data,'exact');