# BIOL398-04/S15:Week 3

BIOL398-04: Biomathematical Modeling

MATH 388-01: Survey of Biomathematics

Loyola Marymount University

This journal entry is due on Tuesday, February 3 at midnight PST (Monday night/Tuesday morning). NOTE that the server records the time as Eastern Standard Time (EST). Therefore, midnight will register as 03:00.

## Individual Journal Assignment

• Store this journal entry as "username Week 3" (i.e., this is the text to place between the square brackets when you link to this page).
• Create the following set of links. (HINT: These links should all be in your personal template that you created for the Week 1 Assignment; you should then simply invoke your template on each new journal entry.)
• Don't forget to add the "BIOL398-04/S15" category to the end of your wiki page.

### MATLAB Skills Development

• Part I: Create a script that includes the following elements
• Define a vector u containing the elements 1,2,3,4,5,6,7,8,9,10 using the colon operation
• Define another vector v containing elements that are the square of the vector x
• Plot v versus u (make sure you know what that sentence means!!) using circles on the points that are connected with dashed lines
• Save your plot as a TIFF file
• Save your data into an excel spreadsheet using the MATLAB command xlswrite
• Part II: Use MATLAB to solve the equation ln(x) + x = 0. The following steps will help.
• Create a function that returns ln(x) + x; its first line should be this: function [y] = logPlusX(x)
• Create a script that uses the MATLAB function fsolve to solve the equation. This script may be short.
• Your script will have to contain an initial guess. Not that x=1 yields ln(1)+1 = 1 while x=0.1 yields ln(0.1)+0.1 =-2.203. You can infer that the root will be in between these two.
• Part III: Play with the four m-files from the Thursday Jan 22 schedule box.
• Run the nutrient/colony model (named Nutrient_colony_script.m)
• Run the chemostat model (named Chemostat_script.m)
• Before doing the above, you will need to download all four files: the script files use the DE function files
• You may notice an issue with the names. openwetware capitalizes the first letter of the file name. You will need to change the name of the file you've saved so that the all letters are lower case.
• Save the graphical output from these two runs to JPEG files.
• Run the chemostat model a second time, but cut the dilution rate in half.
• For this run, you will need to edit the chemostat script file to give the reduced q.
• You may also want to change the name of the plotted quantities so you can do the next job.
• Plot both chemostat model runs on the same graph, adding a legend that allows a reader to identity both runs, and save as JPEG.

### How To Submit Your Work

• Part I.
• Part II.
2. Post the numerical answer you got on your individual journal for Week 3.
• Part III.

## Shared Journal Assignment

• Store your shared journal entry in the shared Class Journal Week 3 page. If this page does not exist yet, go ahead and create it (congratulations on getting in first :) )
• Sign your portion of the journal with the standard wiki signature shortcut (~~~~).