2023-05-21 16:35:37 +02:00
|
|
|
data = csvRead("../data.csv")
|
|
|
|
indiceFecondite=data(:,8)
|
|
|
|
propMoins15Ans = data(:,9)
|
|
|
|
scatter(indiceFecondite, propMoins15Ans, "fill")
|
2023-05-21 17:35:58 +02:00
|
|
|
|
|
|
|
taux_mortalite = data(:, 5);
|
|
|
|
taux_natalite = data(:, 4);
|
|
|
|
coefficients = reglin(taux_natalite, taux_mortalite);
|
|
|
|
pente = coefficients(1);
|
|
|
|
ordonnee_origine = coefficients(2);
|
|
|
|
scatter(taux_natalite, taux_mortalite, "fill");
|
|
|
|
xlabel("Taux de natalité");
|
|
|
|
ylabel("Taux de mortalité infantile");
|
|
|
|
title("Relation entre le taux de natalité et la mortalité infantile");
|
|
|
|
x = linspace(min(taux_natalite), max(taux_natalite), 100);
|
|
|
|
y = pente*x + ordonnee_origine;
|
|
|
|
plot(x, y, "r");
|