function G = mixtureGaussians(x1, x2, mx1, mx2, Cx1, Cx2, noise) % Extend this function to handle N Gaussians by using matrices. Also, make % the adhoc conversion constants more general. % Possible gaussian shapes and sizes mx2= mx2 + (rand(size(mx2))/10)*noise(1) mx1= mx1 + (rand(size(mx1))/10)*0 Cx1= Cx1 + (rand(size(Cx1))/1000)*noise(2) Cx1= Cx1.*eye(size(Cx1)) Cx2= Cx2 + (rand(size(Cx2))/1000)*noise(3) Cx2= Cx2.*eye(size(Cx2)) GB = multiGauss(x1,x2,mx1,Cx1); GS = multiGauss(x1,x2,mx2,Cx2); GS = GS/1500; GB = GB*15; G = GB+GS;