x = -10:0.1:10;a = [1 3 5];figure(1)for i = 1:3 u(1,:) = (1/4*a(i))*(1+erf(x+a(i)/sqrt(2)) - (1+erf(x-a(i)/sqrt(2)))); plot(x,u(i,:))endhold ongrid onxlabel('x')ylabel('CDF')legend('a=1','a=2','a=3','Location','best')title('CDF of normal distribution with \sigma = 1')
MATLAB: Not plotting all the values in a single graph
graphmatrix
Best Answer