**Class Information:**

**Instructor:**Kevin Wedeward (Workman 221, x5708, wedeward@ee.nmt.edu, www.ee.nmt.edu/~wedeward/)**Time/Place:**TR 09:30AM-10:45AM in Workman Center 116**Office Hours:**M-Th 11:00AM-12:00PM

**Corequisite:** MATH 103

**Textbook:**
Introduction to Engineering Programming: C, Matlab and Java by
Mark Austin and David Chancogne, 1999, John Wiley & Sons, ISBN-13
978-0471001164

- Companion site for book

**Description:** EE 251 presents concepts of computer
programming, and the C and Matlab programming languages. Applications
are those related to electrical engineering such as programming
hardware, data acquisition and analysis, and mathematical
calculations.

**Grading:**

- Homeworks (roughly weekly): 20%
- Quizzes (roughly weekly): 40%
- Projects: 40%

**Reading:**

- Look over chapters 1, 2 paying particular attention to sections 2.2.3, 2.3.1, 2.3.2, 2.4
- Chapter 3
- Appendix 1
- Chapter 4
- Chapter 5
- Chapter 6
- Chapter 7 (9/23/2014)
- Chapter 8 (9/30/2014)
- Sections 9.1-9.3 (10/15/2014)
- Chapter 12 (10/21/2014)
- Sections 13 (10/21/2014)

**Assignments:**

- Homework (HW) 1 due beginning of class (BOC) on Th 08/28/2014: Problem 3.2 nicely coded with output provided for inputs of -40 degC, 0 degC and 40 degC
- HW2 due BOC on T 09/09/2014:
- Declare and assign variables for the characters Y, o, d, a, !, and print them as characters on one line, integers on another line, and hexadecimal on another line.
- Problem 4.6 - Reproduce table (nicely formatted) as shown for variable/data types given in Tables 4.4 and 4.5. Note limit.h is described in Appendix and you may need to search internet for information on float.h.

- HW3 due BOC on Th 09/18/2014:
- Problem 5.8 - Use g = 9.81m/s^2, Vo = 100m/s, and give result as table with columns of theta (deg), flight time (sec), and range (m).
- Problem 5.11 - Use values of -1.0, -0.1, -0.01, 0, 0.01, 0.1, 1.0 for x, and give results as table with columns of x, exp_series, exp_math, and % difference.

- HW4 due BOC on Th 09/25/2014: Handout
- HW5 due BOC on Th 10/02/2014: Handout
- Project 1 due BOC on T 10/14/2014: Handout
- HW6 due BOC on T 10/21/2014:
- Problem 8.1 - Call the function twice in your main program to test with array given in the problem and the array {100, 99, 98, 97, ..., 80, 79, 78} (might be more easily defined in a loop).
- Problem 8.2 - Test your function using the array
{{95.7, 42.1, 65.5}, {48.5, 91.5, 3.5}, {80.0, 79.2, 84.9}, {14.2, 95.9, 93.4}}.

- Problem 9.4 - Test your function with values given in the problem; macros not required.

- HW7 due BOC on T 10/28/2014:
- Write a C program to read values for times from the input file times.txt; compute sin(5*pi*t) for each time t given in times.txt; output comma separated values of t, sin(5*pi*t) into an output file named output.csv; and compile the program using a makefile. Hand in a copy of your program, output file, and makefile.
- Write a C program to read comma separated values from the
input file input.csv; output the
values with rows and columns swapped as comma separated
values in an output file named output.csv which should look
something like
1.2699, 6.3236, 2.7850, ... 9.13376, 0.97540, 5.46882, ...

and compile the program using a makefile. Hand in a copy of your program, output file, and makefile.

**Resources:**

- A complete resource to learn C
- Video on the origins of Matlab

**Academic Honesty:**

- Copying assignments, either in part or whole, is not permitted. Students are encouraged to discuss assignments and assist each other with debugging programs, but all work submitted for grading should be that of the individual whose name appears on the assignment.
- Quizzes are to be performed individually without resources unless otherwise specified by the instructor.
- See http://infohost.nmt.edu/~nmtlib/INFO/ORef/plagiarism.html for information on avoiding plagiarism and the Undergraduate Course Catalog for New Mexico Tech's policy on academic honesty.