12.010 Computational Methods of
Scientific Programming
Lecturers
Thomas A Herring
Chris Hill
Overview Today
Solution of ordinary differential equations with
Mathematica and Matlab.
Examine formulations:
Mathematica 2-nd order (and higher order) ODE
can
12.010 Computational Methods of
Scientific Programming
Lecturers
Thomas A Herring
Chris Hill
Overview Today
Examine image and 3-D graphics in Matlab
Examples used in this lecture are:
http:/geoweb.mit.edu/~tah/12.010/Lec18_3D.m
Results from animations
12.010 Computational Methods of
Scientific Programming
Lecturers
Thomas A Herring
Chris Hill
Overview
Part 1: Python Language Basics getting started.
Part 2: Python Advanced Usage the utility of Python
11/15/2011
12.010 Lec P2
2
Refresh
Previous class:
12.010 Computational Methods of
Scientific Programming
Lecturers
Thomas A Herring
Chris Hill
Overview
Part 1: Python Language Basics getting started.
Part 2: Python Advanced Usage the utility of Python
11/10/2011
12.010 Lec P1
2
Part1: Summary of Python
12.010 Computational Methods of
Scientific Programming
Matlab Lecture 4
Lecturers
Thomas A Herring
Chris Hill
Review of Last Lecture
Analysis of the some of the functions needed for the
GUI development in Matlab
Look at functions which would be appropri
12.010 Computational Methods of
Scientific Programming
Matlab Lecture 3
Lecturers
Thomas A Herring
Chris Hill
Summary of last class
Continued examining Matlab operations
path and addpath commands
Variables and constants
IO using fopen, scanf etc.
For
12.010 Computational Methods of
Scientific Programming
Lecturers
Thomas A Herring
Chris Hill
Summary
Today we finish up C and start C+
Final C topics
Structures: A method for grouping like variables
together
Memory management
Start of C+
History
Id
12.010 Computational Methods of
Scientific Programming
Lecturers
Thomas A Herring
Chris Hill
Summary
Finished up C with structures and memory management
Started with C+
C+ is C with the addition of classes
Class is a formal way to think about good pro
12.010 Computational Methods of
Scientific Programming
Matlab Lecture 2
Lecturers
Thomas A Herring
Chris Hill
Summary of Introduction to Matlab
Looked at the basic features of Matlab:
Getting help
Variable definitions and usage
Math operators
Control
12.010 Computational Methods of
Scientific Programming
Matlab Lecture 1
Lecturers
Thomas A Herring
Chris Hill
Summary of Todays class
We will look at Matlab:
History
Getting help
Variable definitions and usage
Math operators
Control statements: Synt
12.010 Computational Methods of
Scientific Programming
Lecture 9
Todays lecture
C in more detail
Summary
LAST LECTURE
Basic C
Syntax v. Fortran
THIS LECTURE
Examined C-pointers
File Input/Output and the routines for formatted reads and
writes
Compi
12.010 Computational Methods of
Scientific Programming
Lecturers
Thomas A Herring
Chris Hill
Mathematica
Look in more detail at some of the programming
features in Mathematica
There are many of these features and in all
Mathematica expressions there are
12.010 Computational Methods of
Scientific Programming
Lecturers
Thomas A Herring
Chris Hill
Mathematica
History
Developed between 1986-1988 at Wolfram Research
Mathematica 1.0 released in 1988
Mathematica 2.0 released in 1991
Mathematica 3.0 release
12.010 Computational Methods of
Scientific Programming
Lecture 8
Todays lecture
Start C/C+
Basic language features
C History and Background
Origins 1973, Bell Labs
Public K&R C The C Programming Language, [Kernighan 1978]
ANSI C standardized 1989, X3.159-
12.010 Computational Methods of
Scientific Programming
Lecturers
Thomas A Herring
Chris Hill
Review Lecture 01
Language characteristics:
Compiled versus interactive
Numeric versus symbolic
Algorithm development
Statement of problem
Algorithm design
12.010 Computational Methods of
Scientific Programming
Lecturers
Thomas A Herring
Chris Hill
Review of last lecture
Start examining the FORTRAN language
Development of the language
Philosophy of language: Why is FORTRAN still used
(other than you cant
12.010 Computational Methods of
Scientific Programming
Lecturers
Thomas A Herring
Chris Hill
Review and todays lecture
So far we have covered most of the features of Fortran 77
although there are still a number of structures and methods that
we have not
12.010 Computational Methods of
Scientific Programming
Lecturers
Thomas A Herring
Chris Hill
Review of Lecture 5
Looked at Fortran commands in more detail
Control through if and do statements.
Logical expressions in Fortran .eq. .ne. .gt. .ge.
.lt. .le
12.010 Computational Methods of
Scientific Programming
Lecturers
Thomas A Herring
Chris Hill
Review of Lecture 2
Examined computer hardware
Computer basics and the main features of programs
Program design: Consider the case of calculating the
area of a
12.010 Computational Methods of
Scientific Programming
Lecturers
Thomas A Herring
Chris Hill
Review of Lecture 4
Looked at Fortran commands in more detail
Looked at variables and constants
IO commands:
Open/Close
Read/Write
Format
Started looking a
12.010 Computational Methods of
Scientific Programming
Lecturers
Thomas A Herring
Chris Hill
Todays class:
Basic content of course and class expectations
Overview of languages
Overview of program development
09/08/2011
12.010 Lec 01
2
Class meetings: