EML3035: Programming Concepts for Mechanical Engineers

A one-credit hour course


Lectures & Assignments      Syllabus


LECTURES, HANDOUTS AND ASSIGNMENTS 

SPRING 2012

Archived lectures


Week 1 January 9, 2012 and January 10, 2012

Lecture Notes

Syllabus

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!

 

Lecture M files

Assigning Numbers to Variables and Performing Math Operations (Lift Exercise) - Week 1:

[mfile] [mfile: Cell formatted] [Published Version]

 

Assigning Numbers to Variables and Performing Math Operations (Kinetic Energy Exercise) - Week 1:

[mfile] [mfile: Cell formatted] [Published Version]

 

Assigning Numbers to Variables and Performing Math Operations (Transformer Exercise) - Week 1:

[mfile] [mfile: Cell formatted] [Published Version]

 

How to Define Strings and Concatenate them (Strings Exercise) - Week 1:

[mfile] [mfile: Cell formatted] [Published Version]

 

How to Convert a Number to a String (Strings Exercise) - Week 1:

[mfile] [mfile: Cell formatted] [Published Version]

Sample Homework (not to be submitted for grade)

Homework Assignment Sheet (not to be submitted for grade)

Mfile

Print out of the published output

Practice Online Quizzes

Assignment

Reading and Exercise Assignment: Chapters 1-4

Test 1 syllabus: Chapters 1-16, 30. 

Assigned HW for grade: Monthly Payment on a Car Due Mon Jan 23 (Sec 001), Tue Jan 17 (Sec 002)

  


 

Week 2 January 23, 2012 and January 17, 2012

 

Lecture M files

Performing Matrix Operations: Chapter 5: Week 2:

 [mfile] [mfile: Cell formatted] [Published Version]

 

Matrix Operations Example: Chapter 5: Week 2:

 [mfile] [mfile: Cell formatted] [Published Version]

 

Plotting Functions: Chapters 6-7: Week 2:

 [mfile] [mfile: Cell formatted] [Published Version]

 

Using Logarithmic, Trigonometric Functions and Inverse Trigonometric Functions: Chapter 8: Weeks 2:

[mfile] [mfile: Cell formatted] [Published Version]

 

Using Symbolic Operations using syms Command: Chapter 9: Week 2:

[mfile] [mfile: Cell formatted] [Published Version]   

    

Using Symbolic Operations using inline Command: Chapter 9: Week 2:

[mfile] [mfile: Cell formatted] [Published Version]   

 

Solving Nonlinear Equations

[mfile] [mfile: Cell formatted] [Published Version]

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 Exercises from Chapter 5-9 Due Mon Jan 30 (Sec 001), Tue Jan 24 (Sec 002)     

 

Note: (Please attach the affidavit below with the homework)

Homework Affidavit Sheet

 

 

 


 

Week 3 January 30, 2012 and January 24, 2012

Lecture M files

Polynomial Interpolation: Chapter 11: Week 3:

 [mfile] [mfile: Cell formatted] [Published Version]

 

Spline Interpolation: Chapter 11: Week 3:

 [mfile] [mfile: Cell formatted] [Published Version]

 

Polynomial Regression: Chapter 12: Week 3:

 [mfile] [mfile: Cell formatted] [Published Version]

 

Differentiating a Mathematical Expression: Chapter 13: Week 3:

 [mfile] [mfile: Cell formatted] [Published Version]

 

Integrating a Mathematical Expression: Chapter 14: Week 3:

 [mfile] [mfile: Cell formatted] [Published Version]

 

Solving an Ordinary Differential Equation: Chapter 15: Week 3:

 [mfile] [mfile: Cell formatted] [Published Version]

Practice Online Quizzes


 

Week 4 February 6, 2012 and January 31, 2012

Lecture Notes

Handouts

    Shrink-fit statement (.pdf)

 

Using the Concepts of Regression, Integration,  and Solving an Nonlinear Equation to Solve a Practical Engineering Problem: Shrink-Fit Solution: Chapter 12 - 15: Week 4:

 [mfile] [mfile: Cell formatted] [Published Version]

 

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 February 13, 2012 and February 7, 2012

Competency test#1

 


Week 6 February 20, 2012 and February 14, 2012

Lecture Notes

Checking a Number if it is Non-negative or Negative using If-End Statement: Chapter 19: Week 6:

[mfile] [mfile: Cell formatted] [Published Version]

 

Checking a Number if it is Non-negative or Negative using If-Else-End Statement: Chapter 19: Week 6:

[mfile] [mfile: Cell formatted] [Published Version]

 

Checking a Number if it is Zero or Negative or Positive using If-End Statement: Chapter 19: Week 6:

[mfile] [mfile: Cell formatted] [Published Version]

 

Checking a Number if it is an Integer or Decimal Number using If-End Statement: Chapter 19: Week 6:

[mfile] [mfile: Cell formatted] [Published Version]

 

Checking a Number if it is an Integer or Decimal Number using If-Else-End Statement: Chapter 19: Week 6:

[mfile] [mfile: Cell formatted] [Published Version]

 

Calculating BMI of Person and Recommending the Target Healthy Weight to the Person: Chapter 19: Example 4: Week 6:

[mfile] [mfile: Cell formatted] [Published Version]

 

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 Feb 21 for Tuesday section; due Feb 27 for Monday section)


Week 7 February 27, 2012 and February 21, 2012

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 Feb 28 for Tuesday section; due March 5 for Monday section).


Week 8 March 5, 2012 and February 28, 2012

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 March 6 for Tuesday section; due March 19 for Monday section)

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

 


Week 9 March 19, 2012 and March 6, 2012

Competency test#2

Test 2 syllabus: Chapters 18-25

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

Sample competency tests

 


Week 10 March 26, 2012 and March 20, 2012

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 March 27 for Tuesday section; due April 2 for Monday section)

 


Week 11 April 2, 2012 and March 27, 2012

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 April 9 for Monday section; due April 3 for Tuesday section)


Week 12 April 9, 2012 and April 3, 2012

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 14 April 16, 2012 and April 10, 2012

 

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 13 April 17, 2012

 

Review

Review of over file reading and writing

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 15 April 23, 2012  and April 24, 2012

Competency test#3

Test 3 syllabus: Chapters 26-29. 


Week 16 Final Exam Week

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