TP-traitement-audio-visuel/TP2/simulation.m
2023-06-22 20:47:16 +02:00

18 lines
587 B
Matlab

function [x_gauche,x_droite] = simulation(y,beta_0,gamma_0,moyennes,ecarts_types,d)
beta = ecarts_types(1:d-1) .* randn(d-1, 1) + moyennes(1:d-1);
% beta = ecarts_types(1:d-1) .* randn(1, d-1) + moyennes(1:d-1)
gamma = ecarts_types(d:2*d-2) .* randn(d-1, 1) + moyennes(d:2*d-2);
% gamma = ecarts_types(d:2*d-2) .* randn(1, d-1) + moyennes(d:2*d-2);
gamma_d = ecarts_types(2*d-1) * randn() + moyennes(2*d-1);
beta_d = gamma_d;
x_gauche = bezier(beta_0, beta, beta_d, y);
x_droite = bezier(gamma_0, gamma, gamma_d, y);
% close all;
% pause
end