A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

caozeyuan

  • one year ago

Help on my Matlab exercise: Write a while loop that outputs the answer to the following question: Sally prepares two plates of 10 cells each. One plate has normal cells, and the other contains cells with a mutation believed to reduce the normal reproduction rate by half. If the number of normal cells triples every hour, how many of each type of cell should be in the plates after 12 hours

  • This Question is Closed
  1. kva1992
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 2

    int hour,regularCell,mutatedCell; (java code) while (hour < 13) { regularCell = i +3; muatedCell = regularCell /2; hour++; } (visual basic code) While hour < 13 regularCell += 3 MutatedCell = regularCell / 2 hour += 1 Exit While End While if i am not mistaken that is how it should be set up

  2. caozeyuan
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Thanks I kind of get the idea, but I still not sure how to right it in Matlab, cuz I think the coding system is different from the one you described

  3. kva1992
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 2

    well first thing i would do is figure out how what their coding system is in order to write the loop

  4. mathmate
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    @caozeyuan The syntax of the while loop is while( condition ) do whatever you need to do end The pseudocode for what you need to do is: 1. Set both Normal and Mutated to 10, and time to zero (initial conditions). 2. While ( time<13 ) do 3. print time, Normal, Mutated 4. Mutated <- Mutated * 3 % multiplication by three, exponential growth. 5. Normal <- Normal * 3/2 % rate is half of normal 6. time <- time + 1 7. end Run your code and post if you have problems.

  5. mathmate
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    *The syntax of the while loop is while( condition ) whatever you need to do end ("do" is not required after "while")

  6. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.