SAE24_2022/resources/scripts/ex1-3.sce

11 lines
626 B
Scilab
Raw Normal View History

2023-05-18 17:47:07 +02:00
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]);