From 4106af07f277686c3853ae96e98c842b72a69625 Mon Sep 17 00:00:00 2001 From: Lyanis Souidi Date: Sat, 20 May 2023 18:01:20 +0200 Subject: [PATCH] [Ex3 - Q4] Ajout --- README.md | 1 + ex3/README.md | 19 +++++++++++++++++++ ex3/img/ex3-4.png | Bin 0 -> 10839 bytes ex3/scripts/ex3-4.sce | 11 +++++++++++ 4 files changed, 31 insertions(+) create mode 100644 ex3/img/ex3-4.png create mode 100644 ex3/scripts/ex3-4.sce diff --git a/README.md b/README.md index 787d381..0de5d2e 100644 --- a/README.md +++ b/README.md @@ -42,3 +42,4 @@ Les réponses aux questions des exercices sont situées dans les README des doss 1. [Acroissements minimaux et maximaux](ex3/#q1) 2. [Pays ayant un taux d'accroissement négatif](ex3/#q2) 3. [Moyenne](ex3/#q3) + 4. [Moyenne par continent](ex3/#q4) diff --git a/ex3/README.md b/ex3/README.md index b8b3d51..5f3ae54 100644 --- a/ex3/README.md +++ b/ex3/README.md @@ -6,6 +6,7 @@ 1. [Acroissements minimaux et maximaux](#q1) 2. [Pays ayant un taux d'accroissement négatif](#q2) 3. [Moyenne](#q3) +4. [Moyenne par continent](#q4) --- @@ -74,6 +75,24 @@ mean(tauxAccroissement); **Résultat :** - Taux d'accroissement moyen : 1.32% +--- + +## Question 4 : Moyenne par continent {#q4} + +> Faire un graphe de l'accroissement moyen suivant le continent. + +**[Script Scilab](scripts/ex3-4.sce) :** + +```scilab +tauxAccroissementMoyenParContient = [mean(tauxAccroissement(1:57)), mean(tauxAccroissement(58:86)), mean(tauxAccroissement(87:99)), mean(tauxAccroissement(100:150)), mean(tauxAccroissement(151:193)), mean(tauxAccroissement(194:207))]; + +bar(tauxAccroissementMoyenParContient) +``` + +**Résultat :** + +![Taux d'accroissement moyen par continent](img/ex3-4.png) + --- diff --git a/ex3/img/ex3-4.png b/ex3/img/ex3-4.png new file mode 100644 index 0000000000000000000000000000000000000000..d00224137ff37fc9684dddd901b56608787334a5 GIT binary patch literal 10839 zcmb7K2RP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xd%f3}xwJ44myuhjOGw~J5G9NZptYl{xX-*E%i9j@3z6r;{R1vy2GVrPn-LIv& z4JdvxKy!pe&28{vp)H}62N}exGYL`djniAc8Gp4y#>k08&eYDN@-PSOu9}Dg7H;p6 z%_EP+X_`$VXpW3_nd1V|-k_S>DagHr-d-T7dl zD%dtcha{K4aRL<6%PR+y%CsZ+G;1*#u#0BDGSgw9urwHDB=QGQaAUjkSe=KkLs4hD zHVvm2cTylC74}`VJOAE9*5UhEB~tKd>#`UpL$ajRmGHnDmc#=+*?Vu4< jF|c2{{$qUL+Zt)x)BU=>I{h(lk3{XHmU8xSW1s&6#!^ZS literal 0 HcmV?d00001 diff --git a/ex3/scripts/ex3-4.sce b/ex3/scripts/ex3-4.sce new file mode 100644 index 0000000..ec34c63 --- /dev/null +++ b/ex3/scripts/ex3-4.sce @@ -0,0 +1,11 @@ +data = csvRead("data.csv"); + +tauxAccroissement = ((data(:, 4) / 1000) - (data(:, 5) / 1000)) * 100; + +tauxAccroissementMoyenParContient = [mean(tauxAccroissement(1:57)), mean(tauxAccroissement(58:86)), mean(tauxAccroissement(87:99)), mean(tauxAccroissement(100:150)), mean(tauxAccroissement(151:193)), mean(tauxAccroissement(194:207))]; + +bar(tauxAccroissementMoyenParContient); +gca().x_ticks.labels = "$\rotatebox{90}{\mathsf{"+_(["Afrique", "Amérique du nord", "Amérique du sud", "Asie", "Europe", "Océanie"])'+"}}$"; +title("Taux d''accroissement moyen par continent"); +ylabel("Taux d''accroissement (%)"); +xs2png(0,"ex3/img/ex3-4.png");