m=-2:0.1:2;
subplot(2,2,1)
plot(m,m,m,tanh(m+1),m,tanh(10*m+10))
legend('m','tanh(m+1)','tanh(10m+10)')
xlabel('m')
i=0;
for w=0:0.1:1,
i=i+1;
m=fsolve(inline('tanh(w*m+w)-m','m','w'),0,[],w);
w1(i)=w;
m_mf(i)=m;
m_ex(i)=(-exp(-w)+exp(3*w))/(3*exp(-w)+exp(3*w));
end;
subplot(2,2,2)
plot(w1,m_mf,w1,m_ex)
legend('m_{mf}','m_{ex}')
xlabel('w')
ylabel('m')

