## Spring 2021

 Instructor Course Web Site http://cs.slu.edu/~dferry/courses/csci1060/ Course Meeting Times Monday, Wednesday, & Friday from 10:00 - 10:50, Online Meeting Zoom Link Click here to join Zoom Meeting ID 963 7422 2282 Zoom Password 996412 Midterm Exams March 10th, April 12th Final Exam Time Wednesday, May 12th, 12:00 - 1:50PM Office Hours See my schedule

Contents

### Course Description

Computing allows scientists and engineers to quantify and analyze problems to a terrific degree. The particulars of how computers are used will vary from field to field and problem to problem, but the process of computer programming (or more generally- computer-aided problem solving) is similar for everybody. Computers are machines that are incapable of original thought or imagination. Using one effectively requires a solid understanding of what a computer is and is not capable of, and then the mental plasticity to transform the real-world problem into a computer model that (hopefully) bears some significance to the original problem that must be solved. The goal of this course is to teach students this process of solving real-world scientific and engineering problems via computer programming.

Learning Outcomes- At the end of this course, students should be able to:

• Solve word problems with a computer
• Write a program to solve a parameterized problem (i.e. solve a class of word problems)
• Simulate simple physical situations deterministically and stochastically
• Use computer data to support the selection of a solution out of several competing alternatives
• Use functions to divide a program into small, easy to read and maintain pieces of code
• Use appropriate control structures (if-else statements, for loops, while loops, etc.) to achieve a desired result and structure code

Topical Outline- the topics we will cover in this course (not necessarily in this order) are:

• What is a program, what is an algorithm
• Variables: declaring, initializing, using, and modifying
• Vector/array data: declaring, initializing, using, and modifying
• Plotting and visualizing data
• Control structures (if-then/else, for loops, while loops, switch statements)
• Functions
• Structuring code effectively
• Text data and string handling
• Deterministic simulation
• Stochastic simulation
• Analyzing datasets with programming

Catalog Description: Elementary computer programming concepts with an emphasis on problem solving and applications to scientific and engineering applications. Topics include data acquisition and analysis, simulation and scientific visualization.

### Prerequisites

• Calculus I or concurrent enrollment in same

### Textbook

Recommended course textbook: MATLAB An Introduction with Applications by Amos Gilat, Published by Wiley

Note: The textbook is recommended as a supplementary resource for those who wish but is not required. Any recent edition of the book is suitable.

### Assignments

There will be approximately 10 assignments for this course and a course project. These are a mix of written and programming assignments whose purpose is to apply course concepts.

Assignments submitted on time will be given full credit. Assignments submitted up to 24 hours late will be given a ten percent penalty. Assignments submitted between 24 hours and 48 hours late will be given a twenty percent penalty. Assignments submitted after 48 hours late will not be given credit, except in the case of extenuating circumstances pre-approved by the instructor.

### Course Schedule

A tentative course schedule is below. Note that this schedule may change over the course of the semester. When changes occur, students will be given enough advance notice so that readings and other preparation may be accommodated.

Week Day Topic Class Code Reading Notes
Jan 29th Fri Introduction, Course Overview
Intro Program
(Class Recording)
intro.m Syllabus (this website)
Feb 1-Feb 5 Mon Overview of MATLAB
Scalars, operators, and precedence
(Class Recording)
(Second Class Recording)
scalars.m Gilat Ch. 1 Homework #1 Assigned
Wed Vectors in MATLAB
(Class Recording)
vectors.m Gilat Ch. 2
Submitting Homework with Git
Fri Two-Dimensional Arrays in MATLAB matrices.m
(Class Discussion)
Homework #1 Due
Feb 8-Feb 12 Mon Vectorized Operations Gilat Ch. 3.1 - 3.6 Homework #2 Assigned
Wed Plotting Data
(Class Discussion)
plotting.m Gilat Ch. 5.1 - 5.4
Fri Case Study: Rolling Pairs of Dice
(Class Discussion)
dicepair.m Gilat Ch. 5.8
Feb 15-Feb 19 Mon Control Structures
(Snow Day - No Class)
controlflow.m Gilat Ch. 6.1 - 6.6 Homework #2 Due
Wed No Class: February Break
Fri Animations
Case Study: The Motion of a Ball
(Class Discussion - Dice Pair and Control Flow)
animateThrow.m Homework #3 Assigned
Feb 22-Feb 26 Mon Discrete Simulation
Case Study: Approximate Motion of a Ball
(Class Discussion - Control Flow)
ball_physics.m
Wed Control Structures: Stock Market Analysis
(Class Discussion - Motion of a Ball)
stocks.m
Fri Basic Input and Output Commands
(Class Discussion - Ball Simulation)
input_output.m Gilat Ch. 4 Homework #3 Due
Mar 1-Mar 5 Mon More Stock Market Analysis
(Class Discussion - Stock Market Analysis 1)
monthly_gain.m
daily_downturn.m
Homework #4 Assigned
Wed Functions
(Class Discussion: More Stock Market Discussion)
peaks.m Gilat Ch. 7
Fri Case Study: Record Rainfall
(Class Discussion: Monthly Gain and Daily Downturn)
Mar 8-Mar 12 Mon Exam Review
(Class Discussion)
Homework #4 Due
Wed First Exam
Functions
(Class Discussion)
peaks.m Gilat Ch. 7
Fri First Exam
Use of subfunctions
Case Study: Stock Market Analysis solution set
Mar 15-Mar 19 Mon Random Processes
Case Study: the gambler
(Class Discussion)
gambler.m
gambler_analysis.m
Homework #5 Assigned
Wed The gambler simulation and random walks (additional notes)
(Class Discussion)
Fri Iterative Solvers
(Class Discussion - Homework 5)
randSqrt.m
directedRandSqrt.m
newtonSqrt.m
Mar 22-Mar 26 Mon More on Iterative Solvers General code for iterative solver (Class Discussion) Assignment #5 Due
Wed Random Solver
(Class Discussion)
Homework #6 Assigned
(Video Walkthrough)
(PDF from video)
Fri (Class Discussion)
Mar 29-Apr 2 Mon File I/O
(Class Discussion)
fileio.m Gilat Ch. 4.3-4.4
Wed Case Study: DNA to RNA Transcription
(Class Discussion)
DNA_transcribe.m
Fri No Class: Good Friday
Apr 5-Apr 9 Mon Case Study: Caesar Cipher
(Class Discussion)
ceasar_cipher.m
Homework #6 Due
Wed Case Study: Random Shift Stream Cipher encrypt.m
Fri (Exam Review Discussion) Exam review programs: argDemo.m, myAverage.m, convertASCII.m, approxPi.m, addLineNumbers.m
Apr 12-Apr 16 Mon Second Exam
Wed Cell Arrays, Structures cells.m
structures.m
MATLAB docs (cell arrays, structures) Project Proposal Assigned
Fri Sound processing in MATLAB
Apr 19-Apr 23 Mon Sound processing in MATLAB Project Proposal Due
Wed Sound processing in MATLAB Homework #8 Assigned
(Homework 8 Explanation Video)
Fri Sound processing in MATLAB
Apr 26-Apr 30 Mon Traversing Mazes
Wed Traversing Mazes Homework #8 Due
Fri Image Data image_processing.m Homework #9 Assigned
May 3-May 7 Mon Digital Watermarking digital_watermarking.m
Wed Finding components of an image
Fri An Introduction to C++ Programming Note: We will do more days if time permits. Homework #9 Due
May 10th Mon
Project Presentations (Presentation and Project Submission Guidelines)
May 12th Mon
Project Presentations (Presentation and Project Submission Guidelines)

Assignments 40%
Project 20%
Midterm Exams 20% each

Grading is done on a straight scale (uncurved). The following scores are guaranteed. The grading scale may be curved upwards (in your favor) at the discretion of the instructor.

• 93% guarantees an A
• 90% guarantees an A-
• 87% guarantees a B+
• 83% guarantees a B
• 80% guarantees a B-
• 77% guarantees a C+
• 73% guarantees a C
• 70% guarantees a C-
• 60% guarantees a D

#### MATLAB

The majority of this course is centered around using MATLAB, a widely used software for scientific and engineering computing. You can access this software in at least the following ways:

• Online Access: Mathworks supports a browser-based version of MATLAB at matlab.mathworks.com. This version of MATLAB will work for this course, but the interface is somewhat different and I am less familiar with how it works. I would suggest installing the local version of MATLAB if you are able, but I have had students do the entire course with this version of MATLAB without too much difficulty.

• Computer labs: The computers in McDonnell Douglas Hall should all have access to MATLAB.

#### Great reads that deal with computing in an engineering context:

• Skunk Works: A Personal Memoir of My Years at Lockheed by Ben Rich - Discusses (among other things) how computers helped the F117 stealth fighter achieve a stealthy radar cross section the size of a 3mm ball bearing.
• Failure Is Not an Option: Misson Control From Mercury to Apollo 13 and Beyond by Gene Kranz - Discusses (among other things) the evolution of the computer command and control technology from the early Redstone rocket program through the Apollo program. Includes a great discussion of the infamous 1201 and 1202 program alarms that ocurred in the Apollo Guidance Computer during the Apollo 11 lunar descent phase.
• What Really Happened on Mars? by Mike Jones and a follow up first person account by Mars Pathfinder software team lead Glenn Reeves of NASA's Jet Propulsion Laboratory. Both discuss the cause and resolution of a computer failure that threatened the wildly successful Mars Pathfinder mission. Relatively technical.

## Attendance

Successful students attend all or mostly all class sessions. This is true in my experience and has been demonstrated in large scale studies as well. In that study, even students who attended nine out of ten class periods had measurably lower class performance than those who attended all classes. However, there is no attendance requirement for this class, and you do not need to get permission when you do miss class. You are an adult and have the freedom to manage your time in whatever way you feel is most useful. Job interviews, conferences, tests in other courses, etc. are all reasonable cases for being absent.

Note that in-class assignments such as tests or quizes cannot be made up outside of class without prior approval from the instructor. All such activities will be listed course schedule with ample time to prepare (i.e. there are no "pop quizes").

If you do miss class you should refer to the course schedule to see what was missed and arrange to get course notes from another student. I am always happy to answer questions but I do not repeat full class periods in office hours.

Academic integrity is honest, truthful and responsible conduct in all academic endeavors. The mission of Saint Louis University is "the pursuit of truth for the greater glory of God and for the service of humanity." Accordingly, all acts of falsehood demean and compromise the corporate endeavors of teaching, research, health care, and community service via which SLU embodies its mission. The University strives to prepare students for lives of personal and professional integrity, and therefore regards all breaches of academic integrity as matters of serious concern.

## Title IX Statement

Saint Louis University and its faculty are committed to supporting our students and seeking an environment that is free of bias, discrimination, and harassment. If you have encountered any form of sexual misconduct (e.g. sexual assault, sexual harassment, stalking, domestic or dating violence), we encourage you to report this to the University. If you speak with a faculty member about an incident of misconduct, that faculty member must notify SLU's Title IX coordinator, Anna R. Kratky (DuBourg Hall, room 36; akratky@slu.edu; 314-977-3886) and share the basic fact of your experience with her. The Title IX coordinator will then be available to assist you in understanding all of your options and in connecting you with all possible resources on and off campus.

If you wish to speak with a confidential source, you may contact the counselors at the University Counseling Center at 314-977-TALK. To view SLUâ€™s sexual misconduct policy and for resources, please visit the following web addresses: www.slu.edu/here4you and https://www.slu.edu/general-counsel.

## Supporting Student Success

In recognition that people learn in a variety of ways and that learning is influenced by multiple factors (e.g., prior experience, study skills, learning disability), resources to support student success are available on campus. The Student Success Center, a one-stop shop, which assists students with academic and career related services, is located in the Busch Student Center (Suite 331). Students can visit https://www.slu.edu/life-at-slu/student-success-center/ to learn more about tutoring services, university writing services, disability services, and academic coaching.

## Disability Services

Students with a documented disability who wish to request academic accommodations must contact Disability Services to discuss accommodation requests and eligibility requirements. Once successfully registered, the student also must notify the course instructor that they wish to access accommodations in the course.

Please contact Disability Services, located within the Student Success Center, at Disability_services@slu.edu or 314-977-3484 to schedule an appointment. Confidentiality will be observed in all inquiries. Once approved, information about academic accommodations will be shared with course instructors via email from Disability Services and viewed within Banner via the instructorâ€™s course roster.

Note: Students who do not have a documented disability but who think they may have one are encouraged to contact Disability Services.

## University Writing Services

Students are encouraged to take advantage of University Writing Services in the Student Success Center; getting feedback benefits writers at all skill levels. Trained writing consultants can help with writing projects, multimedia projects, and oral presentations. University Writing Services offers one-on-one consultations that address everything from brainstorming and developing ideas to crafting strong sentences and documenting sources. For more information, visit https://www.slu.edu/life-at-slu/student-success-center/ or call the Student Success Center at 314-977-3484.

## Basic Needs Security

Students in personal or academic distress and/or who may be specifically experiencing challenges such as securing food or difficulty navigating campus resources, and who believe this may affect their performance in the course, are encouraged to contact the Dean of Students Office (deanofstudents@slu.edu or 314-977-9378) for support. Furthermore, please notify the instructor if you are comfortable in doing so, as this will enable them to assist you with finding the resources you may need.