<< montecarlo sci_gsl splfunc >>

sci_gsl >> sci_gsl > phyconst

phyconst

It gives the value of various physical constants such speed of light c, boltzmann constant k, charge of electron etc. in S.I or MKS units.

Syntax

y = phyconst(constant)

Parameters

y:

output

constant:

It is used to choose the desired physical constant and can be set from 1 to 25.

constant = 1:

Speed of light c.

constant = 2:

Vacuum Permeability.

constant = 3:

Vacuum Permittivity.

constant = 4:

Planck's Constant h.

constant = 5:

hbar = h/2pi.

constant = 6:

Avogadro Number Na.

constant = 7:

Boltzmann Constant k.

constant = 8:

Molar Gas constant R.

constant = 9:

Stefan Boltzmann Constant.

constant = 10:

Gravitational Constant G.

constant = 11:

Value of 1 light year in metre.

constant = 12:

Acceleration due to gravity.

constant = 13:

Magnitude of charge of electron.

constant = 14:

Mass of muon.

constant = 15:

Mass of proton.

constant = 16:

Mass of neutron.

constant = 17:

Mass of electron.

constant = 18:

Electromagnetic hyperfine structure constant.

constant = 19:

Rydberg Constant

constant = 20:

Bohr's radius a0.

constant = 21:

Bohr Magneton muB.

constant = 22:

Nuclear Magneton muN.

constant = 23:

Magnitude of magnetic moment of electron.

constant = 24:

Magnitude of magnetic moment of proton

constant = 25:

Thomson cross-section.

Description

This function takes the parameter constant and provides the value of various physical constants that can be directly used in various calculations.

Examples

// Energy of photon of wavelength 10 nm.
h=phyconst(4)
c=phyconst(1)
lambda=1e-8
y = (h*c)/lambda
disp(y)

Authors


Report an issue
<< montecarlo sci_gsl splfunc >>