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/plot3d.m | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Year_3/MMS/plot3d.m (limited to 'Year_3/MMS/plot3d.m') 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 -- cgit v1.2.3-18-g5258