Question
Problem 2: Somehow, we have gotten in contact with Einstein long lost third cousin, twice removed. Well, they have been working on a chemical treatment
Problem 2:
Somehow, we have gotten in contact with Einstein long lost third cousin, twice removed. Well, they have been working on a chemical treatment that SUPPOSIBILY reduces teenage ache...
They ended up with a model that represents their formula for the secret treatment that they have developed. So this cousin can do everything except learn how to code, they were wondering if you could help reduce the model into a simple equation.
Since we are proud Sun Devils and have already taken algebra and know how to code we decide to help them out. The formula/model for the secret ingredients is:
Treatment=
Where the variables are defined as:
A =Secret Ingredient 1 B= Secret Ingredient 2 C= Water Y= Secret Ingredient 3
To explain the formula a bit more, if we have 3*C that means we added 3 (unit) of water, if it says - * B it means that we need to reduce the concentration of 1 (unit) of secret ingredient 2 by half. The logic behind the model and the practice are very iffy and we were told that its a work in progress.
a) Simplify the combination formula for Treatment by hand, show your work and compare it to that which MATLAB produces with 50 steps to solve. Are they the same? What are some benefits of using the MATLAB simplify function? Hint: Google MathWorks simplify
b) Given the inputs for this specific combination to be in grams, using an anonymous function what would be the total weight of the combination, if you need 5% of a 200 gram of Secret Ingredient 1, 26% of a 100 gram of Secret Ingredient 2, 70% of a .07 liter is Water, 10% of 10 grams of Secret Ingredient 3. The final answer must be in grams, yes you do need to convert L to grams (None of these measurements are true, but will be considered for this assignment)
Two extra-credit Problems ( Do as many as you can): (5Pts total)
- Lets say that the weights were given in different units, use the simplify function to
reduce the units and equation correctly if Secret Ingredient 1 is in kg, Secret Ingredient 2
is in g, Water is in kg and Secret Ingredient 3 is in mg.
- How much time does MATLAB say it takes to solve for the weight with the simplified
equation vs the simplified equation?
Expected outputs:
Report: Full Report Format
Code: Display a statement telling the user what the purpose of the segment of code is. (Short and direct.)
Variable Code that solves the problem
Output all of your results fprintf(), snipit of hand written work allowed
Code is individually developed and well commented.Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started