2011S002
From CDS 130
1. Overview
This is the web page for CDS 130, Section 002 (Monday/Wednesday/Friday at 10:30 am) given in Spring 2011 with Dr. Sheng. If this is not your course then you are in the wrong place! See http://cds130.org/#Sections to find your web page.
2. Class Notes
2.1. Wednesday, May 11th
 Final exam: 10:30 AM ~ 1:30 PM final exam.pdf
2.2. Monday, May 9th
 Reading day
 Help sessions to be held.
2.3. Friday, May 6th
 Review sessions
 Discuss Sample Final Exam and homework problems.
2.4. Wednesday, May 4th
 Release sample Final Exam. Key
 Release study guide and Matlab syntax worksheet
2.5. Monday, May 2nd
 Handson session on the bisection problem
Matlab code  

x = 5:0.01:5; y = x.^2 2 plot(x,y, x, 0); shg a = 0; b = 5; tol = 10e10; fc = 1; while abs(fc) > tol c = (a+b)/2; fc = c^2 2; if fc > 0 b = c; else if fc < 0 a = c; end end fprintf('%10.8f %10.8f\n', c, sqrt(2)) fc end fprintf('The squre root value of 2 is %10.9f\n', c)  
% This step is optional. A plot will help to generate initial guesses. x = 5:0.01:5; y = x.^2 2 plot(x,y, x, 0); shg % Two endpoints are needed to bracket the "root". % The solution falls in the interval of (a, b) a = 0; b = 5; % Tolerance of precision of the final solution. % This needs to be set before hand. tol = 10e10; fc = 1; % Repeat until the tolerance is met. while abs(fc) > tol % Find the midpoint using the bisection method c = (a+b)/2; fc = c^2 2; if fc > 0 % Throw away the right half b = c; else if fc < 0 % Throw away the left half a = c; end end fprintf('%10.8f %10.8f\n', c, sqrt(2)) fc % Repeat end % Print out the solution fprintf('The squre root value of 2 is %10.9f\n', c) 
 Handson session on the tumor project
2.6. Friday, April 29th
 Finish up Ordinary differential equations
 Discuss the bisection problem in Homework #9
 Handson session on the tumor project.
2.7. Wednesday, April 27th
 Revisit the
plot
tool in Matlab  Continue to cover Ordinary differential equations
2.8. Monday, April 25th
2.9. Friday, April 22nd
 HW8 due before class.
 Review HW8 problem #2 and Matlab syntax.
 20minute quiz (open book, no computer).
 Assign HW9 (due in two weeks)
2.10. Wednesday, April 20th
 Review Matlab syntax
 Review Numerical Integration
 Discuss homework problems
2.11. Monday, April 18th
 Finish up Numerical Integration
Note: There will be a 20minute inclass quiz this Friday. We will focus on ifstatements and nested forloops. The problems given in the quiz will be similar to what you are given in the homeworks and class notes. The quiz is worth 10 points and will be considered as extra exam credit added to your final exam scores. You are not allowed to use Matlab during the quiz.
2.12. Friday, April 15th
 HW7 due.
 Discuss Numerical Integration
 Advanced material on Integration and modeling (not covered).
 Assign HW8 (due next Friday on April 22nd)
 Final exam will be on May 11th.
2.13. Wednesday, April 13th
 Introduce computational modeling with example: Bacteria Growth
 Solve problems computationally
 See the announcement on Hacking passwords below.
2.14. Monday, April 11th
 Discuss while loops
 Review the password problem.

Introduce computational modeling with example: Bacteria Growth
Announcement:
The password problem was designed to fulfill one of the IT requirements. This problem, however, helps train our computational thinking, and can be better exploited to practice nested for
loops. This problem is now an extracredit problem worth 5 points. The due date is next Friday (April 22th) before class.
2.15. Friday, April 8th
 Finish if statements, relational operators and logical operators
 Discuss while loops
2.16. Wednesday, April 6th
 Cover if statements, relational operators and logical operators
 Two help sessions will be held on Thursday (April 7th), in the Research I building, room 301 or 302.
Purpose:
 To review homework problems in HW5 and HW6;
 To answer questions that cannot be explained at length in class;
 To further explain the concepts of fprintf, fill, plot, and nested for loops.
Time:
 Session I: 8:00 AM  10:00 AM; Tutor: Dr. Joe Marr
 Session II: 1:00 PM  3:00 PM; Tutor: Dr. Howard Sheng
Note:
The help sessions are not mandatory. We decide to have two sessions because some students may find it difficult to attend the session in the morning or in the afternoon. Feel free to attend either of them.
2.17. Monday, April 4th
 Recitation on HW6
 Review Images, plots, nested for loops and fprintf
2.18. Friday, April 1st
 HW6 due (Note: There will be no extension for HW6).
 Continue to cover ifstatements and nested forloops.
 Assign HW7
2.19. Wednesday, March 30th
 Cover nested forloops and ifstatements
2.20. Monday, March 28th
 Continue to discuss Matrices as images. More on color maps and color bars.
 HW5 due before class.
2.21. Friday, March 25th
 Matlab tutorial: Drawing text and shapes on images

HW5 is due before class  Assign HW6 (due before class next Friday)
2.22. Wednesday, March 23rd
 Continue to discuss Images and colors in Matlab.
2.23. Monday, March 21st
 Matrices as images
 A color slider
 Midterm grade distribution
2.24. Friday, March 11th
 Midterm exam Midterm exam.pdf
 Happy spring break.
2.25. Wednesday, March 9th
 Midterm review
 Sample Midterm exam and answer key (pdf files).
 Study guide
2.26. Monday, March 7th
 Matrices as images
 A color slider
 Midterm review worksheet and sample exam questions will be distributed in class.
2.27. Friday, March 4th

Maxtrices as images  A color slider
 Assign HW5 (due after spring break, March 25th).
 Class on next Wed. (Mar. 9th) will be a review session for Midterm exam, led by Dr. Marr.
 Midterm exam will be on next Friday (Mar. 11th) in class (50 minutes).
 You will be expected to answer 25 multiplechoice or shortanswer questions for the exam.
 The truth tables for AND, OR and NOT will not be provided for the exam.
 You'll be expected to interpret and write simple Matlab codes.
 A Midterm review worksheet will be given next Monday.
2.28. Wednesday, March 2nd
 Recitation on Iteration, Matrices and MATLAB
 MATLAB tutorials uploaded.
 MATLAB exercises (after class)
2.29. Monday, February 28th
 HW4 is due before class
 Recitation on Iteration, Matrices and MATLAB
2.30. Friday, February 25th
 Due date for HW4 is postponed to next Monday.
 As of today, the classroom is changed to IN 222 (permanently).
 Continue on MATLAB tutorials. MATLAB slides and code worksheet are distributed.
 Matrix and iterations
 Midterm exam is tentatively set on March 11th.
2.31. Wednesday, February 23rd
 Tutorials on MATLAB by Dr. Joe Marr.
 Classroom is changed to IN 323 for today's class.
2.32. Monday, February 21st
 Access the virtual computing lab at mason
 Handson session on Excel
 Iteration and Matrix
2.33. Friday, February 18th
 HW3 due before class
 Cover Spreadsheets and Iteration
 Assign HW4
2.34. Wednesday, February 16th
 Cover A Basic Computer
and Spreadsheets
2.35. Monday, February 14th
Finish Logic Gates and Transistors
2.36. Friday, February 11th
 HW2 due before class.
 Continue on Binary Arithmetic
and Logic Gatesand Transistors  Assign HW3
2.37. Wednesday, February 9th
 Today, I will continue to discuss Binary Arithmetic
and Logic Gates
2.38. Monday, February 7th
 Today I will cover Binary Addition and Computing Limits
2.39. Friday, February 4th
 HW1 due before class.
 Today I will discuss Data Storage, Memory, and Digitization
 Assign HW2
2.40. Wednesday, February 2nd
 Today I will discuss Encoding
2.41. Monday, January 31st
 Today I will cover Binary Representation of Numbers
2.42. Friday, January 28th
2.43. Wednesday, January 26th
 Today I will discuss FAQ, course logistics,and Syllabus and entry survey.
2.44. Monday, January 24th
 Today I will give a broad overview of Computational Science (Introduction).
3. FAQ
3.1. As a neuroscience major, what can I learn from this course?
First off, allow me to quote from Archimedes "Give me a lever long enough and a fulcrum on which to place it, and I shall move the world."
Through this course, we strive to provide a computational lever for you. With competencies in each major, I hope you eventually will be able to solve science problems such as:
 Neuronscience: Understanding the visual cortex of the brain [1].
 Biology: Solving problems of protein folding and structure [2]
 Chemistry: Designing molecules [3]
 Earth Science: Studying solid earth dynamics [4]
3.2. Exactly what kind of problems will I be able to solve?
To get a taste of it, here are two examples students worked on later in the last semester Tumor  Antialias.
3.3. Am I qualified for this course?
If you are concerned with math, most likely you are qualified for this course, provided that you understand
 Trigonometry and Transcendental Functions
 Some mathematical concepts to simplify science problems
3.4. How much programming is needed?
There is no requirement on programming languages.
In this course, a highlevel computing language Matlab will be taught. Matlab is a powerful mathematical tool that offers a computing environment for numerical computation, graphics and visualization.
Students may access and use MATLAB without charge either on campus or from any computer with an internet connection. There are three ways to use Matlab at Mason:
 Via access to the virtual computing lab at Mason
 Matlab is installed on all computers in various computer labs on campus. Simply log on, and there is Matlab.
 Install Matlab on your personal computer. A $109dollar student version of MATLAB may be purchased at Patriot Computers.
Tutorials on accessing and using Matlab will be given to students as class progresses.
3.5. What if I have a question about homeworks and am having difficulty understanding the course content?
 My office hours will be held following each class or by appointment (hsheng@gmu.edu). My office is located in Research I, Room 370.
 The T.A. of this course is Dr. Joseph Marr (jmarr2@gmu.edu). Dr. Marr will grade your homeworks and exams, and answer questions as well. While Dr. Marr can be reached by email and text or by a 'rolling' appointment, he prefers personal interaction with students. Usually he will be available after class and would like to interact with students using the whiteboard in Research I, Rm 302. Over the semester, several tutoring sections will be held to work on difficult problems.
 Special announcements will be made through an email list, such as assignments, due dates, upcoming exams, tutorials, etc.
 A group page has been set up on Facebook. If you have a Facebook page, welcome to join the group.
3.6. Do we have a textbook for this course?
None. The course "Computing for Scientists" was newly approved as a general education course at GMU. It has been codeveloped by several faculty members at the CDS department. A wiki page (cds130.org) was created for this course in 2010 by Dr. Weigel. There are two sections (section 1 & section 2) in Spring 2011. All course materials covered in the current section can be obtained from http://cds130.org/2011S002.
The wiki page was designed to facilitate student interaction and to fulfill the IT requirements.
4. Syllabus
My syllabus is everything stated at Syllabus along with the following additions and notes.
4.1. Format
This is a threecredit course. Active learning techniques will be used during my lectures. After presenting a major concept I will pose a question which you will think about, discuss with your neighbor, and then possibly present your answers.
Be inquisitive and vocal during class.
4.2. Homeworks
 Are 40% of your grade!
 Weekly Homeworks. Assigned on Friday, due on next Friday before class
 Will partially work many difficult problems in class
 Most homeworks will be handwritten in the first half of the semester
 Most homeworks will be turned in electronically in the second half of the semester
 Late penalty = 20% if late by less than 7 days; 40% if more than 7 days late
4.3. Draft Schedule
(Red links are for pages that are not complete)
 Week 1: Course Introduction, Syllabus and course logistics, Entry survey, Introduction to MediaWiki, Screenshots
 Week 2: Binary representation of numbers, Encoding and data storage, and Digitization.
 Week 3: Binary addition, Computing_Limits, Transistors, Logic_Gates, A basic computer.
 Week 4: Spreadsheets vs programming languages, Programming languages, Assignment, Matrices, Iteration
 Week 5: Matrices as images
 Week 6: If_Statement, Nested_For_Loops
 Week 7: Midterm review, midterm exam
 Week 8: Spring Break
 Week 9: Modeling introduction, Science models, Mathematical models, and Computational models
 Week 10: Difference equations and ODEs
 Week 11: Numerical_Integration
 Week 12: Science applications
 Week 13: Verification and Validation
 Week 14: Ethics and Digital notebooks
 Week 15: Security, Exit survey, Final exam review
 Week 16: Final Exam (date TBD).