From 349e35266ae31f32c5a259dda10f051907ac0dd3 Mon Sep 17 00:00:00 2001 From: Lyanis Souidi Date: Thu, 18 May 2023 17:47:07 +0200 Subject: [PATCH] [Ex1 - Q3] Ajout --- README.md | 10 ++++++++++ resources/img/ex1-3.png | Bin 0 -> 6459 bytes resources/scripts/ex1-3.sce | 10 ++++++++++ 3 files changed, 20 insertions(+) create mode 100644 resources/img/ex1-3.png create mode 100644 resources/scripts/ex1-3.sce diff --git a/README.md b/README.md index f7e8c95..374b26f 100644 --- a/README.md +++ b/README.md @@ -69,3 +69,13 @@ densiteOceanie = populationOceanie / surfaceOceanie; - Asie : 140.97 habitants/km² - Europe : 32.28 habitants/km² - Océanie : 4.76 habitants/km² + +## Question 3 +> Représenter la densité moyenne d’habitants au km2 pour chaque continent en utilisant un diagramme en bâtons (on mettra en abscisse des entiers de 1 à 6). + +**[Script Scilab](resources/scripts/ex1-3.sce) :** +```scilab +bar([densiteAfrique, densiteAmeriqueDuNord, densiteAmeriqueDuSud, densiteAsie, densiteEurope, densiteOceanie]); +``` +**Résultat :** +![Diagramme en bâtons](resources/img/ex1-3.png) \ No newline at end of file diff --git a/resources/img/ex1-3.png b/resources/img/ex1-3.png new file mode 100644 index 0000000000000000000000000000000000000000..6d8cfab1201b270517f9b7b736531dd5afc94817 GIT binary patch literal 6459 zcmdT}dpwkB-ydt&2r-qM5>0v{L=KDO)Uc#1yY$$SMF=5GHk!D`f~=tF9jP1pR`?m8x=IP^x(~#E5bWJokP4j{Y=zlQp<@db+1tG zS0||^oT}{}5xwe>#p#Jbf>YMtD=YNEBjzJ5LcSjkzBs(FcHPav{LY}I5UhTKgtURd z4v=85csUphB>}TY7W&Aes18f`JA^Px_~VaA5f~(l05LRaVs2 zDg^`tpx^#l$NZthwQ6^sy=r)PIAv+N|Hw<-MT}{U`E9$qgF!asefm2<1ko3?d(#dqCC;nZ`vCQ-Ud=CQd$+P6+0`9-&&Q|;elPi#SUda(>Cnq%@_u>>M|)H*OY zxETkRqEP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x3BE^a|Lm6@vn=!DNF`E zG)fZ7T*x0)HD9$gPI4-;Zvt17<7;<_;nRN%FpI^RYdv*j1~%aR_DSxjSiBtFi+vL| z9zL0Cggz*OJ86Ptngk6#zr_@uUr@t$y024YCl$@s-WC|euCKV-^e#^IOf215dEY2C z%2*!GpQ2N4X?$}R)PhX5AE=Ev(FAU~mYVQ6saW(yQdg0KS5#C~NrwlZn0AsBcBQc@ ztu#z8uPcBuVZITSYZ`4(%a{&sPLHJ(taRlw^&@;U7>U$(-Nk5XZ<$flythg0dhZj9 zV`%?H*SRr9a!9$qC!jL$1Xb_Wb$aaZ58 z{7^-oAT#}9^%cPB#$2a`IdcfmPOn)D^D1+7VZtjkG_<5{W4315O{|o9q=kTG1YlKt z(g-Qk*)Pp7G&Qr0^@WvDov!nFbNQ@87)2 zB!-NjjB(WG*~`NZkl==W`+fia{YD?G{eRu)bA|u>Mt?r9&!H*JLHi{ literal 0 HcmV?d00001 diff --git a/resources/scripts/ex1-3.sce b/resources/scripts/ex1-3.sce new file mode 100644 index 0000000..60af252 --- /dev/null +++ b/resources/scripts/ex1-3.sce @@ -0,0 +1,10 @@ +data = csvRead("resources/data/data.csv"); + +densiteAfrique = sum(data(1:57, 3)* 1000000) / sum(data(1:57, 2)* 1000); +densiteAmeriqueDuNord = sum(data(58:86, 3)* 1000000) / sum(data(58:86, 2)* 1000); +densiteAmeriqueDuSud = sum(data(87:99, 3)* 1000000) / sum(data(87:99, 2)* 1000); +densiteAsie = sum(data(100:150, 3)* 1000000) / sum(data(100:150, 2)* 1000); +densiteEurope = sum(data(151:193, 3)* 1000000) / sum(data(151:193, 2)* 1000); +densiteOceanie = sum(data(194:207, 3)* 1000000) / sum(data(194:207, 2)* 1000); + +bar([densiteAfrique, densiteAmeriqueDuNord, densiteAmeriqueDuSud, densiteAsie, densiteEurope, densiteOceanie]);