summaryrefslogtreecommitdiff
path: root/Year_3/MMS/plot3d.m
diff options
context:
space:
mode:
Diffstat (limited to 'Year_3/MMS/plot3d.m')
-rw-r--r--Year_3/MMS/plot3d.m24
1 files changed, 24 insertions, 0 deletions
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