Lauren M. Magee Week 3

From OpenWetWare
Revision as of 11:45, 29 January 2015 by Lauren M. Magee (talk | contribs) (→‎MATLAB Skills Development: Added Template)
Jump to navigationJump to search

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.
  • Part III: Play with the four m-files from the Thursday Jan 22 schedule box.
    • Run the nutrient/colony model
    • Run the chemostat model
    • 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
    • Plot both chemostat model runs on the same graph, adding a legend that allows a reader to identity both runs, and save as JPEG.

Lauren M. Magee

  1. Week 1
  2. Week 2
  3. Week 3
  4. Week 4
  5. Week 5
  6. Week 6
  7. Week 7
  8. Week 8
    • Assignment Cancelled
  9. Week 9
  10. Week 10
  11. Week 11
  12. Week 12
  13. Week 13
  14. Week 14
  15. Week 15