Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Final Projects
Final Projects due 11:59pm Thurs 5/16. Submit to Blackboard at any time.
Upload any .py, .m, or .r scripts so we can grade code and reproduce results
You may use Python, MATLAB or R
Most projects have been adjusted to be of roughly equal di
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Final Projects will be posted by the end of this week
Due on Exam date instead of Exam
Solving Differential Equations in MATLAB
Most of the models in BME involve rates Differential Equations
Cell/Organism Populations:
dN
= rN
dt
N = N 0 e rt
Chemical Rea
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Read Pratap: Ch 3 (Interactive Computation) Ch 4 (Programming in MATLAB)
Interactive MATLAB:
Array manipulation, Linear Algebra
Built in Math functions
More on Matrix division
Plotting
Flow control and Programming in MATLAB
Linear Algebra Operations
> x=[
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Continue: Ch 2 (Interactive Tutorials) Sections 711
Assignment 14: due 4/13 Sat 11:59pm
Assignment 15: due 4/15 Mon 11:59pm
More intro exploratory MATLAB:
Array construction and access
2 types of function definitions anonymous (inline), function file
Sym
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Read: Zelle, Ch 12 (Object Oriented Design) 13 (Algorithm Design) done!
13th Asgmt: Ch. 13
MC110, D1,3,4, PE1,2,5,7,10,11 due Sun 3/31 11:59pm
For PE10,11 use the attached file: words
(This file is big enough ~500,000 that binary search is needed)
Progra
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Read: Zelle, Ch 11 Data Collections
11th Asgmt: Ch. 11
Dates:
MC110, D1,2, PE58,1012
due Sun 3/17 11:59pm
for PE11 and 12 use mitchell.dat as input
and censor.dat as censor list
In class programming assignment: Wed Mar 3/13
Midterm Apr 1 1:302:45
Data
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Read: Zelle, Ch 9 (Simulation & Design)
8th Asgmt: Ch. 9
MC110, D2, PE7,10,1214 due Fri 3/1 11:59pm
and: use MC simulation find unit nsphere with largest volume
Simulation and Design
Use simulation to solve realworld problems
Models real problems to
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Read: Zelle, Ch 7 (Decision Structures) Ch 8 (Loop Structures and Booleans)
7th Asgmt: Ch. 8
MC110, D2, PE37, lprime due Mon 2/25 11:59pm
for PE4: test using 7,
lprime.py: find largest prime <1 trillion=1012
Loop Structures and Booleans
Definite and Ind
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Monte Carlo Simulation to find unit nsphere with largest volume
Calculate Volume
while (in+out)<100000:
x=[1,1)
y=[1,1)
z=[1,1)
if x*2+y*2+z*2<=1:
in=in+1
else:
out=out+1
print(Area: ,in/(in+out)*8)
(1,1)
(1,1)
(1,1)
(1,1)
(Now the area of the cub
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Read: Zelle, Ch 10 (Defining Classes)
10th Asgmt: Ch. 10
Dates:
MC110, D3, PE1,3,7,11 due Fri 3/8 11:59pm
In class programming assignment: Wed Mar 3/13
Midterm Apr1 1:302:45
Defining Classes
How defining new classes can provide structure for a complex p
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2014
Read: Zelle, Ch 5 (Sequences: Strings, Lists, Files)
4th Asgmt: Ch. 5
due Fri 11:59pm
MC110, D1def,2cf,3d,4ad, PE4,9,10,14,16
for PE14,16 use as input: input5.14.txt input5.16.txt
Data types so far: int, float
New data types: string, list
(list is someti
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2014
Read: Zelle, Ch 9 (Simulation & Design)
8th Asgmt: Ch. 9
MC110, D2, PE7,10,1214 due Fri 2/28 11:59pm
and: use MC simulation find unit nsphere with largest volume
In class programming assignment 3/12 and 3/26, In class Midterm (programming) 4/2/2014
Sim
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2014
Read: Zelle, Ch 7 (Decision Structures) Ch 8 (Loop Structures and Booleans)
7th Asgmt: Ch. 8
MC110, D2, PE37, sprime due Mon 2/24 11:59pm
for PE4: test using 7,
sprime.py: find smallest prime >1 trillion=1012
In class programming assignment 3/12/2014
In
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2014
Read: Zelle, Chapter 1 (Computers and Programs), and Appendix B (IDLE)
Note: great chapter summaries in Appendix A, glossary in Appendix C
1st Assignment: Ch. 1
posted (Course Content / Assignments)
due by 11:59pm Sunday 2/2, submit file to Blackboard
Ass
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Final Projects will be posted by the end of next week
Due on Exam date instead of Exam
Numerical Methods in MATLAB
Most of the models developed in real biomedical engineering problems are differential
equations which are too complicated to solve analytic
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Read: Pratap, Ch 1 (Intro), and Ch 2 (Interactive Tutorials)
Assignment 14: due 4/13 Sat 11:59pm
Why MATLAB:
Computer Scientists and real programmers do not consider MATLAB to be a
real programming language, but it is.
MATLAB is a powerful tool which inte
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
580.200 Scientific Computing in BME using Python, MATLAB, and R
Spring 2013
Course Description:
This course is an introduction to scientific programming and computing designed for firstyear students. The aim is to develop core computer skills required to
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Project: Heart Cell Classification
Lab: Rene Vidal
Introduction: Classification, the process of assigning a label to a datapoint, is a commonly encountered
problem in BME. In our lab, we look at the problem of classification of heart cells from their
elec
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Read: Zelle, Chapter 1 (Computers and Programs), and Appendix B (IDLE)
Note: great chapter summaries in Appendix A, glossary in Appendix C
1st Assignment: Ch. 1
posted (Course Content / Assignments)
due by 11:59pm Sunday 2/3, submit file to Blackboard
TA
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Read: Zelle, Ch 4 (Objects and Graphics), and Ch 5 (Sequences: Strings, Lists, Files)
3rd Asgmt: Ch. 4
due 11:59pm Mon 2/11
Objects and Graphics:
To understand the concept of objects and how they can simplify programs.
To be familiar with the various obje
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Project: Image Segmentation
Lab: Rene Vidal
Introduction: In any image, we have objects, actions or people we are interested in and we also have a
lot of other things that we don't really pay attention to. Our brain processes the information stored in
the
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Read: Zelle, Ch 2 (Writing Simple Programs), and Ch 3 (Computing with Numbers)
2nd Asgmt: Ch. 2 & 3
posted (Course Content / Assignments)
due by 11:59pm Friday 2/8
for Program Exercises, turn in code and output generated
Software Development Process:
Ana
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Modeling a Twolink Arm
Pavan Vaswani & Reza Shadmehr
Introduction
This lab will introduce you to the mathematics behind modeling a twolink arm. By the end, you
should have a simple, working model of an arm in MATLAB.
What is a twolink arm, or manipulan
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Project: Simulation of Biological Oscillations
Lab: Beer
Background: Biological oscillators are important in many systems, including neuronal excitation,
cardiomyocyte contraction, regulation of the cell cycle, and signalling that leads to complex social
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Project: Auditory Neuron Response
Lab: Eric Young
This project addresses the characteristics of a neuron in the brain that respond to sounds. Such
neurons can be modeled as taking the sound at the ear as an input and producing a train of action
potentials
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Project: GUI for Mixing Metastability
Lab: Beer
Background: In Statistical Mechanics and Thermodynamics, we study the problem of mixing two pure
substances, A and B. Entropy always favors mixing, but if interactions between A and B molecules are
energetic
Introduction to Scientific Computing Using in BME using Python Matlab and R
EN 580.200

Spring 2013
Project: Simulation of Ion Channel Gating
Lab: Joseph Greenstein
Introduction: Many of the properties of excitable tissues such as nerves and muscles arise from
the properties of individual cells, each of which may be considered a miniature, but still rat