335Lab2 - Paul Gonzales Pag757 335 Lab#2 1 x =-5:0.1:5 f1 =...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Paul Gonzales Pag757 335 Lab #2 1) x = -5:0.1:5; f1 = exp(x); plot(x, f1); xlabel('x'); ylabel('f(x)=e^x'); title('e^x'); 2) f2 = exp(x); f2(x==0) ans = 1 3) x = -5:0.1:5; f3 = exp(-x); plot(x, f3); xlabel('x'); ylabel('f(x)=e^-^x');
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Paul Gonzales Pag757 335 Lab #2 title('e^-^x'); 4) x = -5:0.1:5; f4 = exp(-x.*x); plot(x, f4); xlabel('x'); ylabel('f(x)=e^-^x^2');
Background image of page 2
Paul Gonzales Pag757 335 Lab #2 title('e^-^x^2'); 5) x = -5:0.1:5; A = 0.5:0.5:4; f5 = exp(-A'*(x.*x)); plot(x, f5); xlabel('x'); ylabel('f(x)=e^-Ax^2'); title('e^-Ax^2'); As you decrease A, less lines appear and the graph widens outwards (becomes wider along the x-axis). As you increase A, more lines appear and the graph becomes more narrow. (becomes more narrow along the x-axis)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Paul Gonzales Pag757 335 Lab #2 6) x = -5:0.1:5; A = 0.5:0.5:4; B = -0.1:0.01:0.1; f6 = B'*exp(-(x.*x)); plot(x, f6); xlabel('x'); ylabel('f(x)=Be^-x^2'); title('Be^-x^2'); As you increase the value of B, more lines are generated and the peak of the graph
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 14

335Lab2 - Paul Gonzales Pag757 335 Lab#2 1 x =-5:0.1:5 f1 =...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online