Unformatted text preview: Introduction to Computational Physics Phy 265 Quiz 11a (InLab) 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
 Spring '11
 Tegler
 Physics, Chemistry, end fprintf

Click to edit the document details