Computer Science 121 - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Computer Science 121

Description:

Title: Computer Science 121 Last modified by: levys Document presentation format: On-screen Show (4:3) Other titles: Times New Roman Arial Courier New StarSymbol Luxi ... – PowerPoint PPT presentation

Number of Views:103
Avg rating:3.0/5.0
Slides: 16
Provided by: wlu52
Category:

less

Transcript and Presenter's Notes

Title: Computer Science 121


1
Computer Science 121
  • Scientific Computing
  • Winter 2012

2
Who Am I?
Contact Google simon levy Interests Robotics /
drones, cognitive science, linguistics,
Artificial Intelligence, philosophy of mind,
programming languages, iPhone apps, ...
3
Who Are You?
  • Neuroscience
  • Geology
  • Biology
  • Undecided
  • Math
  • English
  • Accounting

4
Who Are You?
  • Senior (2012)
  • Junior (2013)
  • Sophomore (2014)
  • Firstyear (2015)

5
How Will You Do in this Course?
  • A
  • A-
  • B
  • B
  • B-
  • C
  • C

6
Textbook
  • Based on Matlab
  • Developed over 4 yaears _at_ Macalester College
  • Barely in print order from http//www.lulu.com
  • We'll cover Ch. 1-8 in 1st 6 weeks, then various
    remaining chapters based on interest/progress.

7
Purpose
from http//www.macalester.edu/kaplan/
cs121/policies.pdf
  1. To teach you to write effective computer
    programs.
  2. To introduce you to some of the main
    methodological areas of scientific computation
    and provide you with the tools you need to carry
    out computational tasks you are likely to
    encounter in research.

8
Purpose
(continued from Kaplan PDF)
  • Scientific computing (???) Computing
    (programming) for the sciences
  • But skills are transferable to general
    programming work
  • Difficulties
  • Absolute precision in specifying instructions
  • Considering full range of circumstances of how a
    program will be used
  • Considering how your assumptions may not be
    shared by the user
  • Systematically tracking down bugs
  • Breaking down complicated problems into
    simple(r) sub-problems

9
Matlab
  • An integrated programming and graphical
    environment
  • Interpreted interactive get answer immediately
  • Also supports saving and loading large programs
  • Student version available for 100 from
    http//mathworks.com
  • Free, open-source equivalent Octave
  • http//www.gnu.org/software/octave

10
Matlab
  • Issues
  • Matlab vs.
  • higher-level (Excel / SPSS) package
  • lower-level (C / Java / Python) language
  • Matlab vs. a similar package (Mathematica,
    Maple)
  • Matlab vs. Python

11
1) Abstraction
  • Recipe analogy How to make chocolate-chip
    cookies?
  • High-level (Excel / SPSS) version
  1. Make chocolate-chip dough
  2. Bake cookies
  • Too abstract

12
1) Abstraction
  • Low-level (Java / C) version
  1. Drive to store
  2. Buy dozen eggs, 1 lb. flour, 1lb. sugar, 1qt.
    milk, 1 bag chocolate chips, 1 lb. butter, 1 lb.
    lard
  3. Drive home
  4. Turn oven dial to 375 F.
  5. Take out bowl, measuring cup
  6. Measure ½ cup lard, ½ cup butter
  7. Put butter, lard into bowl
  8. Stir butter, lard, clockwise 20 times,
    counter-clockwise 20 times
  9. Measure 1 cup flour
  10. Add flour to bowl
  11. Stir clockwise 10 times, ...
  • Too concrete

13
1) Abstraction
  • Recipe analogy How to make a cake?
  • Matlab version

(http//www.skyport.com/rogue-press/chocchip/basic
.htm)
  1. Mix ½ cup lard, ½ cup butter, getting them good
    and creamy.
  2. Mix in 1 cup flour, ¾ cup brown sugar, ¾ cup
    white sugar, 2 eggs, 1 tsp. vanilla, and ½ tsp.
    baking soda.
  3. Work this over until it is thoroughly mixed,
    then blend in 1 ¼ cup more flour.
  4. Bake at 375 degrees 8-10 minutes.

14
2) Matlab vs. Mathematica / Maple
  • Features
  • Matlab Numerical (linear algebra)
  • Maple, Mathematica Symbolic (calculus)


from http//www.physicsforums.com/archive/topic/
t45208_Matlab_vs_Maple_vs_Mathematica.html
... Matlab is excellent for manipulating data, or
dealing with any sort of matrix
calculations.. From my experience Mathematica is
ideal when it comes to symbolics such as
differentiation and integration. I've seen a few
cases where Mathematica blows Maple out of the
water when one compares the types of integrals
they can evaluate. Maple and Matlab have the
best graphics in my opinion. In both of them you
are allowed to rotate 3D graphics and zoom in on
the spot (2D) in realtime. In Mathematica things
are little more complicated, which often
elicits frustration. With Mathematica, in order
to zoom, you must change the window that you are
plotting with.
15
3) Matlab vs. Python
  • Python General-purpose language popular in CS
  • Interpreted
  • Free, open-source
  • SciPy (Matplotlib) Matlab-like packages
  • Good support for parallel / high-performance
    computing
Write a Comment
User Comments (0)
About PowerShow.com