Skip to content

A collection of fundamental physical constants in various unit systems for MATLAB.

License

Notifications You must be signed in to change notification settings

heriantolim/PhysConst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhysConst

A collection of fundamental physical constants in various unit systems for MATLAB.

Licensing

This software is licensed under the GNU General Public License (version 3).

Tested On

  • MATLAB R2013b - R2018a

Syntax

v=Constant.NameOfConstant returns the value of the named constant in the default unit system. See the list of physical constant names. For examples:

  • v=Constant.ElementaryCharge returns the value of the elementary charge, e;
  • v=Constant.LightSpeed returns the value of the speed of light, c.

Default Unit System

By default, the values are returned in the SI units. To set a different unit system as default, do one of the following:

  • Make a variable assignment: UnitSystem='UnitSystemCode';, where UnitSystemCode refers to the unit system to be used. See the list of unit system codes.
  • Define an anonymous function: UnitSystem=@()'UnitSystemCode';.
  • Create a function named UnitSystem in the current working directory or elsewhere. The function takes no input arguments and returns a string specifying the unit system code.

v=Constant.UnitSystemCode.NameOfConstant returns the value of the named constant in the specified unit system, regardless of the default unit system. For examples:

  • v=Constant.SI.ElementaryCharge returns the value of the elementary charge, e, in the SI units (=1.602176565);
  • v=Constant.P.LightSpeed returns the value of the speed of light, c, in the Planck units (=1).

Uncertainties

[v,u]=Constant.NameOfConstant and [v,u]=Constant.UnitSystemCode.NameOfConstant additionally return the uncertainty of the named constant.

List of Unit System Codes

  • HA: Hartree Atomic Units
  • P: Planck Units
  • QCD: Quantum Chromodynamics Units
  • RA: Rydberg Atomic Units
  • S: Stoney Units
  • SI: International System of Units

List of Physical Constant Names

  • AtomicMass: atomic mass unit, mu
  • AvogadroNumber: Avogadro's number, NA
  • BohrMagneton: Bohr magneton, μB
  • BohrRadius: Bohr radius, a0
  • Boltzmann: Boltzmann constant, kB
  • ConductanceQuantum: conductance quantum, G0
  • Coulomb: Coulomb constant, ke
  • ElectronMass: electron mass, me
  • ElementaryCharge: elementary charge, e
  • Faraday: Faraday constant, F
  • FermiCoupling: Fermi coupling constant, GF/(ħc)3
  • FineStructure: fine-structure constant, α
  • FluxQuantum: magnetic flux quantum, Φ0
  • Gravitational: Newtonian constant of gravitation, G
  • HartreeEnergy: Hartree energy, Eh
  • LightSpeed: speed of light, c
  • Loschmidt: Loschmidt's number, n0
  • NuclearMagneton: nuclear magneton, μN
  • Planck: Planck constant, h
  • ProtonMass: proton mass, mp
  • ReducedPlanck: reduced Planck constant, ħ
  • Rydberg: Rydberg constant, R
  • StefanBoltzmann: Steffan-Boltzmann constant, σ
  • VacuumImpedeance: vacuum impedance, Z0
  • VacuumPermeability: vacuum permeability, μ0
  • VacuumPermittivity: vacuum permittivity, ε0
  • WienDisplacement: Wien displacement law constant, b

About

A collection of fundamental physical constants in various unit systems for MATLAB.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published