diff options
author | Santo Cariotti <santo@dcariotti.me> | 2021-11-09 11:48:46 +0100 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2021-11-09 11:48:46 +0100 |
commit | 31894ea76b065de954f262a3a4b85ddda5589169 (patch) | |
tree | 7f4906c5af0f02647f2b8eb8981e471549ddd237 /Year_3/MMS/plot3d.m | |
parent | 37ba5d61d6b8eb53dd2dc05cce6bf0efe59c64d5 (diff) |
mms: first lesson
Diffstat (limited to 'Year_3/MMS/plot3d.m')
-rw-r--r-- | Year_3/MMS/plot3d.m | 24 |
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 |