initializePhysicalConstants.m
无许可证
initializePhysicalConstants.m loads important physical constants into
the structure CONSTS. The CONSTS structure will contain both values
(accessible by CONSTS.var_name), and descriptive information
(CONSTS.desc.var_name.[Name, Units, Value]).
EXAMPLE USAGE:
% What are the units of the unversal gas constant?
CONSTS.desc.R
ans =
Name: 'Gas Constant'
Units: 'J K^-1 mol^-1'
Value: 8.3140
% Atoms in 10 grams of oxygen:
V = 1; %L
P = 1; % atm
T = CONSTS.T_o + 20; % K
nMols = P*V / (CONSTS.R*T)
nMols =
4.1030e-004
% How may atoms?
nAtoms = nMols * CONSTS.N_a
nAtoms =
2.4708e+020
This program can be vastly improved; I'm happy to do so if people
actually use it. (for example: more constants, database functionality,
embedded dimensional information...) Just send me an email (see my
webpage.)
Created: Rob Chambers
http://www.stanford.edu/~robc1
8/16/20007
Free to use or modify, just keep my reference info intact.
引用格式
Rob Chambers (2024). initializePhysicalConstants.m (https://www.mathworks.com/matlabcentral/fileexchange/15957-initializephysicalconstants-m), MATLAB Central File Exchange. 检索来源 .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
- Sciences > Chemistry >
- Sciences > Chemistry > Quantum Chemistry >
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0.0.0 |