# MATLAB: Plotting the probit model

erfintplot

I tried to plot the probit function as below.
I wrote a code which does not work. y above is equivalent to p below. t above is equivalent to z below. (please ignore i)
isyms x p z a bp=(1/sqrt(2*pi))*(int(exp(-(z^2)/2),z,-inf,a+b*x))a=3.9833b=0.04846p=subs(p)plot(x,p)
The result says that
    ip = 0.50000000000000003123668917430668*erf(0.034266394616300093032464917787601*x + 2.8166184415003747539458833475722) + 0.50000000000000003123668917430668 Error using plotNon-numeric data is not supported in 'Line'
I have not heard of 'erf', and I searched it.

syms x p z a ba = sym(3.9833);b = sym(0.04846);p = (1/sqrt(2*pi))*(int(exp(-(z^2)/2),z,-inf,a+b*x));figure(1)fplot(x,p, [-10 10])grid
set(gca, 'Ylim',[0.9997  0.9999])