Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rcc02007 committed Dec 20, 2019
0 parents commit 54905e9
Show file tree
Hide file tree
Showing 35 changed files with 51,614 additions and 0 deletions.
460 changes: 460 additions & 0 deletions 01_Introduction/.ipynb_checkpoints/01-Introduction-checkpoint.ipynb

Large diffs are not rendered by default.

Binary file added 01_Introduction/octave-workspace
Binary file not shown.
13,750 changes: 13,750 additions & 0 deletions 02_Roundoff-Truncation errors/.ipynb_checkpoints/02_Getting-started-checkpoint.ipynb

Large diffs are not rendered by default.

Binary file added 02_Roundoff-Truncation errors/octave-workspace
Binary file not shown.

Large diffs are not rendered by default.

Binary file added 05_consistent coding/gp_image_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions 05_consistent coding/my_caller.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
function [ax,ay]=my_caller(x,y,t)
% Help documentation of "my_caller"
% This function computes the acceleration in the x- and y-directions given
% three vectors of position in x- and y-directions as a function of time
% x = x-position
% y = y-position
% t = time
% output
% ax = acceleration in x-direction
% ay = acceleration in y-direction

function v=diff_match_dims(x,t)
v=zeros(length(t),1);
v(1:end-1)=diff(x)./diff(t);
v(end)=v(end-1);
end

[vx,vy]=my_function(x,y,t);

ax = diff_match_dims(vx,t);
ay = diff_match_dims(vy,t);

end
21 changes: 21 additions & 0 deletions 05_consistent coding/my_function.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
function [vx,vy] = my_function(x,y,t)
% Help documentation of "my_function"
% This function computes the velocity in the x- and y-directions given
% three vectors of position in x- and y-directions as a function of time
% x = x-position
% y = y-position
% t = time
% output
% vx = velocity in x-direction
% vy = velocity in y-direction

vx=zeros(length(t),1);
vy=zeros(length(t),1);

vx(1:end-1) = diff(x)./diff(t); % calculate vx as delta x/delta t
vy(1:end-1) = diff(y)./diff(t); % calculate vy as delta y/delta t

vx(end) = vx(end-1);
vy(end) = vy(end-1);

end
10 changes: 10 additions & 0 deletions 05_consistent coding/nitrogen_pressure.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function P=nitrogen_pressure(v,T)
% function to calculate Pressure of Nitrogen using ideal gas law given the specific
% volume, v (m^3/kg), and temperature, T (K)
% Pv = RT
% R=0.2968; % kJ/kg-K
% P [in kPa] = nitrogen_pressure(v [in m^3/kg], T[in K])
R=0.2968; % kJ/kg-K
P=R*T./v;
end

Binary file added 05_consistent coding/octave-workspace
Binary file not shown.
3 changes: 3 additions & 0 deletions 05_consistent coding/setdefaults.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set(0, 'defaultAxesFontSize', 16)
set(0,'defaultTextFontSize',14)
set(0,'defaultLineLineWidth',3)
24 changes: 24 additions & 0 deletions data/carpet_age.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
age,cys_acid
120,0.88
128,1.03
170,1.19
250,1.21
140,1.22
300,1.32
400,1.49
400,1.53
550,1.87
1050,3.12
1400,3.54
1400,3.65
1400,3.72
1400,3.81
1550,3.82
1500,3.93
1550,3.97
1550,3.99
1600,4.01
1600,4.27
1600,4.3
1600,4.33
1750,4.39
142 changes: 142 additions & 0 deletions data/land_global_temperature_anomaly-1880-2016.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
Global Land Temperature Anomalies, January-December
Units: Degrees Celsius
Base Period: 1901-2000
Missing: -999.0000
Year,Value
1880,-0.47
1881,-0.45
1882,-0.41
1883,-0.60
1884,-0.60
1885,-0.52
1886,-0.48
1887,-0.47
1888,-0.46
1889,-0.31
1890,-0.49
1891,-0.55
1892,-0.52
1893,-0.56
1894,-0.35
1895,-0.40
1896,-0.27
1897,-0.29
1898,-0.37
1899,-0.18
1900,-0.13
1901,-0.09
1902,-0.33
1903,-0.39
1904,-0.46
1905,-0.42
1906,-0.20
1907,-0.60
1908,-0.49
1909,-0.39
1910,-0.33
1911,-0.44
1912,-0.51
1913,-0.34
1914,-0.07
1915,-0.07
1916,-0.36
1917,-0.51
1918,-0.37
1919,-0.32
1920,-0.28
1921,-0.06
1922,-0.24
1923,-0.21
1924,-0.26
1925,-0.10
1926,0.01
1927,-0.15
1928,-0.10
1929,-0.40
1930,-0.08
1931,-0.03
1932,-0.02
1933,-0.34
1934,-0.02
1935,-0.14
1936,-0.12
1937,-0.03
1938,0.17
1939,0.09
1940,0.04
1941,0.11
1942,0.07
1943,0.09
1944,0.21
1945,-0.08
1946,-0.01
1947,0.06
1948,0.06
1949,-0.05
1950,-0.33
1951,-0.07
1952,-0.08
1953,0.17
1954,-0.16
1955,-0.13
1956,-0.42
1957,-0.05
1958,0.13
1959,0.05
1960,-0.04
1961,0.10
1962,0.16
1963,0.21
1964,-0.24
1965,-0.13
1966,-0.07
1967,-0.00
1968,-0.11
1969,-0.10
1970,0.02
1971,-0.04
1972,-0.18
1973,0.29
1974,-0.21
1975,0.12
1976,-0.25
1977,0.21
1978,0.08
1979,0.15
1980,0.27
1981,0.49
1982,0.09
1983,0.49
1984,0.05
1985,0.07
1986,0.28
1987,0.41
1988,0.55
1989,0.39
1990,0.59
1991,0.53
1992,0.26
1993,0.35
1994,0.45
1995,0.77
1996,0.35
1997,0.68
1998,0.96
1999,0.80
2000,0.64
2001,0.83
2002,0.94
2003,0.89
2004,0.81
2005,1.05
2006,0.92
2007,1.10
2008,0.87
2009,0.88
2010,1.09
2011,0.91
2012,0.92
2013,1.01
2014,1.02
2015,1.35
2016,1.45
13 changes: 13 additions & 0 deletions data/life_exp_avg_continent_year.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
year,Africa,Americas,Asia,Europe,Oceania
1952,39.136,53.280,46.314,64.409,69.255
1957,41.266,55.960,49.319,66.703,70.295
1962,43.319,58.399,51.563,68.539,71.085
1967,45.335,60.411,54.664,69.738,71.310
1972,47.451,62.395,57.319,70.775,71.910
1977,49.580,64.392,59.611,71.938,72.855
1982,51.593,66.229,62.618,72.806,74.290
1987,53.345,68.091,64.851,73.642,75.320
1992,53.630,69.568,66.537,74.440,76.945
1997,53.598,71.150,68.021,75.505,78.190
2002,53.325,72.422,69.234,76.701,79.740
2007,54.806,73.608,70.728,77.649,80.720
Loading

0 comments on commit 54905e9

Please sign in to comment.