From 31894ea76b065de954f262a3a4b85ddda5589169 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Tue, 9 Nov 2021 11:48:46 +0100 Subject: mms: first lesson --- Year_3/MMS/DensityEarth.txt | 29 +++++++++++++++++++++++++++++ Year_3/MMS/T.mat | Bin 0 -> 919 bytes Year_3/MMS/fish.txt | 15 +++++++++++++++ Year_3/MMS/plot3d.m | 24 ++++++++++++++++++++++++ Year_3/MMS/speed-and-density.txt | 11 +++++++++++ 5 files changed, 79 insertions(+) create mode 100644 Year_3/MMS/DensityEarth.txt create mode 100644 Year_3/MMS/T.mat create mode 100644 Year_3/MMS/fish.txt create mode 100644 Year_3/MMS/plot3d.m create mode 100644 Year_3/MMS/speed-and-density.txt diff --git a/Year_3/MMS/DensityEarth.txt b/Year_3/MMS/DensityEarth.txt new file mode 100644 index 0000000..86c96a2 --- /dev/null +++ b/Year_3/MMS/DensityEarth.txt @@ -0,0 +1,29 @@ +5.50 +5.57 +5.42 +5.61 +5.53 +5.47 +4.88 +5.62 +5.63 +4.07 +5.29 +5.34 +5.26 +5.44 +5.46 +5.55 +5.34 +5.30 +5.36 +5.79 +5.75 +5.29 +5.10 +5.86 +5.58 +5.27 +5.85 +5.65 +5.39 diff --git a/Year_3/MMS/T.mat b/Year_3/MMS/T.mat new file mode 100644 index 0000000..7037139 Binary files /dev/null and b/Year_3/MMS/T.mat differ diff --git a/Year_3/MMS/fish.txt b/Year_3/MMS/fish.txt new file mode 100644 index 0000000..291255a --- /dev/null +++ b/Year_3/MMS/fish.txt @@ -0,0 +1,15 @@ +Type_Fish Price_1970 Price_1980 +COD 13.1 27.3 +FLOUNDER 15.3 42.4 +HADDOCK 25.8 38.7 +MENHADEN 1.8 4.5 +OCEAN PERCH 4.9 23 +SALMON, CHINOOK 55.4 166.3 +SALMON, COHO 39.3 109.7 +TUNA, ALBACORE 26.7 80.1 +CLAMS, SOFT-SHELLED 47.5 150.7 +CLAMS, BLUE HARD-SHELLED 6.6 20.3 +LOBSTERS, AMERICAN 94.7 189.7 +OYSTERS, EASTERN 61.1 131.3 +SEA SCALLOPS 135.6 404.2 +SHRIMP 47.6 149 \ No newline at end of file diff --git a/Year_3/MMS/plot3d.m b/Year_3/MMS/plot3d.m new file mode 100644 index 0000000..afae6e2 --- /dev/null +++ b/Year_3/MMS/plot3d.m @@ -0,0 +1,24 @@ +% lesson of nov 9th, 2021 +% display a 3D plot + +[X, Y] = meshgrid(-2*pi:0.1:2*pi, -4*pi:0.1:4*pi); +Z = sin(X) + cos(Y); + +% surf(X, Y, Z); + +Z = X.^2+Y.^2; +mesh(X, Y, Z); + + +xlabel('X'); +ylabel('Y'); +zlabel('Z'); + +% --- + +T = readtable("speed-and-density.txt"); +Y = table2array(T(:,1)); +X = table2array(T(:,2)); +plot(X, Y); +ylabel('Speed'); +xlabel('Density'); \ No newline at end of file diff --git a/Year_3/MMS/speed-and-density.txt b/Year_3/MMS/speed-and-density.txt new file mode 100644 index 0000000..3db89c1 --- /dev/null +++ b/Year_3/MMS/speed-and-density.txt @@ -0,0 +1,11 @@ +Speed Density +25.4 69 +32.5 56 +28.6 62 +11.5 119 +21.3 84 +22.1 74 +22.3 73 +18.5 90 +37.2 38 +44.6 22 -- cgit v1.2.3-18-g5258