0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 % PHYSICS class that defines common physical constants.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 % The usage of these utils it is now deprecated and will be removed in future releases.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 % Please use the syntax
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 % >> plist(plist('Built-In', 'physical_constants')).find('<constant_name>'); instead!
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 % M Hewitson 08-08-08
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 % $Id: physics.m,v 1.5 2011/07/06 06:41:15 mauro Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 classdef physics
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 properties (Constant = true)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 c = 299792458; % m s^-1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 epsilon0 = 8.854187817e-12; % F m^-1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 mu0 = 4*pi*1.e-7; % N A^-2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 h = 6.62606896e-34; % J s
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 G = 6.67428e-11; % m^3 kg^-1 s^-2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 e = 1.602176487e-19; % C
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 kB = 1.3806504e-23; % J K^-1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 dep = deprecation_message();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 function out = deprecation_message()
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 out = ['The usage of these utils it is now deprecated and will be removed in future releases. ' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 'Please use the syntax '' plist(plist(''Built-In'', ''physical_constants'')).find('' constant_name ''); '' instead!'];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 disp(out);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 end
|