Advertisement
Guest User

Untitled

a guest
May 28th, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. clear;close all;
  2. a=3.5;sigma=1.5;
  3. x=1:0.01:6;
  4. figure(1)
  5. y=(1/((sqrt(2*pi))*sigma))*exp(-((x-a).^2)/(2*sigma.^2));
  6. plot(x,y,'r','LineWidth',1);
  7. hold on; % show the plot in the same figure
  8. a=3.5;sigma=0.5;
  9. x=1:0.01:6;
  10. y=(1/((sqrt(2*pi))*sigma))*exp(-((x-a).^2)/(2*sigma.^2));
  11. plot(x,y,'b','LineWidth',1);
  12. ylabel('f(x)');
  13. legend('sigma=1.5','sigma=0.5')
  14. hold off;
  15. grid on; % show the grid line
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement