EML3035: Programming Concepts for Mechanical Engineers

A one-credit hour course


Lectures & Assignments      Syllabus


LECTURES, HANDOUTS AND ASSIGNMENTS 

FALL 2011

Archived lectures


Week 1 August 22 and August 26, 2011

Lecture Notes

Syllabus

Attendance and prerequisite Affidavit Sheet

Homework Affidavit Sheet

Apps site (read about saving files)

First few chapters and Chapter 30 - Go to Blackboard>EML3035>Modules.

Multitasking gets a bad rap!

Class Notes (Lift Exercise) - Week 1

Class Notes (Kinetic Energy Exercise) - Week 1

Class Notes (Transformer Exercise) - Week 1

Class Notes (Strings Exercise) - Week 1

Sample Homework (not to be submitted for grade)

Homework Assignment Sheet

Mfile

Print out of the published output

Class Notes

Practice Online Quizzes

Assignment

Reading and Exercise Assignment: Chapters 1-4

Test 1 syllabus: Chapters 1-16, 30. 

Assigned HW for grade: Due Mon Aug 29 (Sec 001), Friday Sept 2 (Sec 002)

         Chapter 3 - Exercise 6: Monthly Payment on a Car

         (the format has to follow the sample HW - hard copy to be submitted).  


Week 2 August 29 and September 2, 2011

Lecture Notes

     Chapter 5: Matrix operations - mfile

     Chapter 5: Finite Element Methods Example - mfile

     Chapter 6-7: Plotting - mfile

     Chapter 8: log, exp and trig functions - mfile

     Chapter 9: Symbolic operations - mfile

     Chapter 10: Solving a nonlinear equation - mfile

Practice Online Quizzes

Chapter 05 - How Do I Use Matrices?

Chapter 06 - How Do I Plot in MATLAB?

Chapter 07 - What Else Can I Do With Plots?

Chapter 08 - How Do I Use Logs and Trig Functions?

Chapter 09 - How Do I Use Symbolic Characters?

Chapter 10 - How Do I Solve a Nonlinear Equation?

Helpful Videos

Using Basic Plot Functions (5:30) 

Assignment

Reading and Exercise Assignment: Chapters 4-10

Test 1 syllabus: Chapters 1-16, 30. 

Assigned HW for grade Due Mon Sep 12 (Sec 001), Friday Sept 9 (Sec 002)

6 exercises total. Use one mfile.  No need to define the given problem in comments or disp statements, just use problem number.  You still need to use fprintf and disp statements for inputs and outputs of each problem.

e.g.

%%   Chapter 5 Exercise 4

 

      Chapter 5  - Exercise 4

      Chapter 7  - Exercise 2

      Chapter 8  - Exercise 1

      Chapter 8  - Exercise 3

      Chapter 9  - Exercise 1

      Chapter 10 - Exercise 4

Practice Online Quizzes

Chapter 11 - How Do I Interpolate Data?

Chapter 12 - How Do I Regress Data to a Polynomial?

Chapter 13 - How Do I Differentiate a Continuous Function?

Chapter 14 - How Do I Integrate a Function?

Chapter 15 - How Do I Solve an Ordinary Differential Equation?

Assignment

Reading and Exercise Assignment: Chapters 10-15

Test 1 syllabus: Chapters 1-16, 30. 

Assigned HW for grade: Due Mon Sept 19 (Sec 001), Friday Sept 16 (Sec 002):

5 exercises total. Use one mfile.  No need to define the given problem in comments or disp statements, just use problem number.  You still need to use fprintf and disp statements for inputs and outputs of each problem.

e.g.

%%   Chapter 11 Exercise 2

 

      Chapter 11  - Exercise 2

      Chapter 12  - Exercise 3

      Chapter 13  - Exercise 2

      Chapter 14  - Exercise 1

      Chapter 15  - Exercise 2


Week 4 September 16, 2011 and September 19, 2011

Lecture Notes

Handouts

    Shrink-fit statement (.pdf)

    Shrink-fit solution (mfile)

Extra Class Notes

    Parachute problem statement (.doc)

    Parachute problem solution (mfile)

Assignment

No assigned homework for a grade

Study for test one (See syllabus for dates and rules)

      Test 1 syllabus: Chapters 1-16, 30. 

      Develop one-page handwritten (your own handwriting) help guide

      Redo Homework 1, 2 and 3 (not for grade or re-grade)


Week 5 September 23, 2011 and September 26, 2011

Competency test#1

 


Week 6 September 30, 2011 and October 3, 2011

Lecture Notes

     Chapter 19: mfile - Is an input number negative or nonnegative?

     Chapter 19: mfile - Is an input number negative, positive or zero?

     Chapter 19: mfile - Is an input number an integer or a decimal?

     Chapter 19: mfile - Determine if a person is healthy or not healthy based on their BMI

     Chapter 19: mfile - BMI continued: Exercise 3 parts b and c

Assignment

Reading and Exercise Assignment: Chapters 18-20

Chapter 17 is voluntary but will make you a better programmer for the HWs and tests

Test 2 syllabus: Chapters 18-25. 

Assigned Homework for Grade: Federal Tax problem: (due Oct 7 for Friday section; due Oct 10 for Monday section)


Week 7 October 7, 2011 and October 10, 2011

Lecture Notes

Chapter 21: Custom function to find the area & perimeter of a triangle [test mfile] [function mfile]

Chapter 21: Custom function to for the BMI calculator [test mfile] [function mfile]

Chapter 22 - Exercise 7: for-end loop to find average and standard deviation [mfile]

Print odd numbers only [mfile]

Loop applications: [mfile (to include Example 3 - Chapter 22 and extras)] 

Practice Online Quizzes

Chapter 21 - How Do I Use Functions?

Chapter 22 - How Do I Use For-End Loops?

Chapter 23 - How Do I Use While-Loops?

Assignment

Reading and Exercise Assignment: Chapters 21-22

Test 2 syllabus: Chapters 18-25. 

Assigned Homework for Grade: Principal Stresses Function and Testing (due Oct 14 for Friday section; due Oct 17 for Monday section).


Week 8 October 14, 2011 and October 17, 2011

Lecture Notes

Loop structure mfile (for-end and corresponding while-end

Chapter 23 - Example 2 and Extras: mfile (while-end loop)

Continue and break statement structure [mfile]
Continue and break statement applications [mfile]

Finding (approximate) the area under a curve [test mfile] [function]

Loop with break applications: Ch 24 - Exercise 5 and Ch 25 - Exercise 2

Practice Online Quizzes

Chapter 23 - How Do I Use While-Loops?

Chapter 24 - What are the Break and Continue Statements?

Chapter 25 - How Can Loops Work For Me?

Assignment

Reading and Exercise Assignment: Chapters 22-25

Test 2 syllabus: Chapters 18-25. 

Assigned Homework for Grade: Series Summation (due Oct 21 for Friday section; due Oct 24 for Monday section)

Study for Test 2 and build your one note sheet (8.5'' x 11'')


Week 9 October 21, 2011 and October 24, 2011

Competency test#2

Test 2 syllabus: Chapters 18-25

Know your conditional statements, writing extrinsic functions, and repetition statements

Sample competency tests

 


Week 10 October 28, 2011 and October 31, 2011

Lecture Notes

Use of Vector - Chapter 26    

Basic Examples (displaying grades, generating a vector, min and max)

Vector in class exercises (dot product, Young's modulus)

Generating Several Random Lotto

Nested loops - Chapter 27  

Structure mfile with a few examples

Practice Online Quizzes

Chapter 26 - How Do I Use Vectors?

Chapter 27 - How Can I Sort a Vector?

Assignment

Reading and Exercise Assignment: Chapters 26-27

Test 3 syllabus: Chapters 26-29. 

Assigned homework for grade: Secant method (due Nov 4 for Friday section; due Nov 7 for Monday section)


Week 11 November 4, 2011 and November 7, 2011

Lecture Notes

Vector Sorting (bubble sort method) - Chapter 27  

       Refresher on Nested loops - adding two equal sized matrices

       Vector element movement techniques (using temp variable)

       Vector sorting techniques (bubble sort method)

Special Matrix Operations - Chapter 28  

       Finding the trace of a matrix

       Is an input matrix an identity matrix?

Practice Online Quizzes

Chapter 27 - How Can I Sort a Vector?

Chapter 28 - What are Some Special Types of Matrices?

Assignment

Reading and Exercise Assignment: Chapters 27-28

Test 3 syllabus: Chapters 26-29. 

Assigned Homework for Grade: Tridiagonal Matrix: (due Nov 14 for Monday section; due November 18 for Friday section)


Week 12 November 14, 2011 and November 18, 2011

Lecture Notes

Chapter 29 - Reading and writing to an external file

  Reading an external file - Example 1

       input file (txt)

       basic MATLAB program (mfile)     

  Reading an external file - Example 2

       input file (txt)

       for-end loop program (mfile)  

  Reading an external file - Example 3

       input file (txt)

       while-end loop program (mfile)  

  Example of reading an external file - Crushing of a soda can

     Finite element analysis PowerPoint

  Find the value of the maximum Von-Mises stress       

       input file (txt)

       while-end loop program (mfile)

  Find the maximum energy stored in the can with the corresponding time     

       input file (txt)

       while-end loop program (mfile)

Assignment

Reading and Exercise Assignment: Chapters 29

Test 3 syllabus: Chapters 26-29. 

Assigned Homework for Grade: NONE


Week 13 November 21, 2011

 

Review

Is a matrix strictly diagonally dominant?  (mfile)

Is a matrix diagonally dominant? (mfile)

Exercise 3 - Find the maximum and minimum elements in a matrix. (mfile)

Exercise 4 - Diagonal and upper triangular operation. (mfile)

Exercise 6 - Find the norm of a matrix. (mfile)

Assignment

Test 3 syllabus: Chapters 26-29. 

Final Exam: Chapters 1-30 (see online syllabus for format, time and date).

Assigned Homework for Grade: NONE


Week 14 November 28, 2011 and December 2, 2011

Competency test#3

Test 3 syllabus: Chapters 26-29. 


Week 15 Final Exam Week

Final Exam: Chapters 1-30 (see online syllabus for format, time and date - not same as class time and day).