程序代码:
>> clear all
>> x=[-10:0.1:10];
>> f1=normpdf(x,0,1);
>> f2=normpdf(x,0,2);
>> f3=normpdf(x,1,2);
>> plot(x,f1,'b*',x,f2,'ro',x,f3,'g+')
>> legend('X~N(0,1)','X~N(0,4)','X~N(1,4)')
程序代码:
>> clear all
>> x=[-10:0.1:10];
>> f1=normpdf(x,0,1);
>> f2=normpdf(x,0,2);
>> f3=normpdf(x,1,2);
>> plot(x,f1,'b*',x,f2,'ro',x,f3,'g+')
>> legend('X~N(0,1)','X~N(0,4)','X~N(1,4)')