quiz11a_solution - Introduction to Computational Physics...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Introduction to Computational Physics Phy 265 Quiz 11a (In-Lab) Solution 1. 2. 3. q=quad('1.0/(2*pi)^(1/2)*exp(-x.^2/2)',-2.5,2.5) q = 0.9876 A=[4,-2,6;2,8,2;6,10,3]; b=[8;4;0]; x=A\b x = -1.8049 0.2927 2.6341 s = 0; for k=0:10 s = s + 1/factorial(k); end fprintf('Series has value of %.6f\n',s); Series has value of 2.718282 ...
View Full Document

This note was uploaded on 02/23/2012 for the course PHYSICS 265 taught by Professor Tegler during the Spring '11 term at N. Arizona.

Ask a homework question - tutors are online