xgrid = linspace(0,1,1000)';
n1 = makedist('normal',GMM.mu(1),sqrt(GMM.Sigma(1))); % make distribution
n2 = makedist('normal',GMM.mu(2),sqrt(GMM.Sigma(2)));
p = GMM.ComponentProportion;
y_1 = p(1)*pdf(n1,xgrid);
y_2 = p(2)*pdf(n2,xgrid);
plot(xgrid,y_1,'b--');
hold on;
plot(xgrid,y_2,'g--');
tol = 0.1; % change tolerance as required.
target_x = find(abs(s1-s2) < tol); % the intersection we need