HW02_soln

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

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

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

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

View Full Document
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:
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online