HW02_soln - Problem 1 They were to copy the code that I...

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

View Full Document Right Arrow Icon
Problem 1 They were to copy the code that I gave them directly into an m-file and run it. Should look like this: acid = 400; water = .05; ncasts = 190; conc = (acid/(acid+water))^ncasts limit = 0.75; ncasts = log(limit)/(log(acid)-log(acid+water)); % log is natural log ncasts = ceil(ncasts) % ceil rounds positive number up >> acid_bath conc = 0.9765 ncasts = 2302 Problem 2 All they needed to do was to change the constants in the m-file and re-run: acid = 1000; water = .5; ncasts = 1000; conc = (acid/(acid+water))^ncasts limit = 0.75; ncasts = log(limit)/(log(acid)-log(acid+water)); % log is natural log ncasts = ceil(ncasts) % ceil rounds positive number up >> acid_bath conc = 0.6066 ncasts = 576
Background image of page 1

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

View Full DocumentRight Arrow Icon
Problem 3 I gave them everything except the equation for side2 and the hypotenuse (highlighted). The TA tells me they were thrown by the printed equation defining hypotenuse and the fprintf using the variable hyp instead. m = input('Enter a value for m:
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

HW02_soln - Problem 1 They were to copy the code that I...

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

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