# Book HW 5 - 8.1 a balance=1000 For years=[1:10 For...

This preview shows pages 1–2. Sign up to view the full content.

MATLAB Book HW# 5 4.2 a) log(x+x^2+a^2) b) (exp(3*t)+t^2*sin(4*t))*(cos(3*t))^2 c) 4*atan(1) d) sec(x)^2 +cot(x) e) atan(a/x) 4.3 a) m=input(‘enter length in meters: ‘); inches=m*39.37; feet=fix(inches/12); inches=rem(inches, 12);l yards=fix(feet/3); feet=rem(feet, 3); disp( [yards feet inches] ); 4.4 a) m1=input( 'mass of sphere 1' ); m2=input( 'mass of sphere 2' ); a=input( 'direction of the blow making an angle a(in degrees)' ); d=input( 'coefficient of restitution' ); tan(b)=((m2)(1+d)tan(a))/(m1-d(m2)+(m1+(m2))tan(a)^2)

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

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

Unformatted text preview: 8.1 a) balance=1000; For years=[1:10] For months=[1:12] Balance=balance*1.01; End Disp( [years balance] ); End 8.2 a) terms=100; Pi=0; Sign=1; For n=1 : terms Pi=pi+sign*4/(2*n-1); End b) terms=100; pi=0; for n=1 : terms pi=pi+8/((4*n-3)*(4*n-1)); end 8.3) a=1 n=6 for i=1:10 n=2*n; a=sqrt(2-sqrt(4-a*a)); l=n*a/2; u=l/sqrt(1-a*a/2); p=(u+1)/2; e=(u-1)/2; disp( [n, p, e] ); end 8.8) sum=0; terms=0; while (sum+terms)<=100 terms=terms+1; sum=sum+terms; end disp( [terms, sum] );...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern