Week 1 - Introduction

Reading

Before class read the following sections of the textbook.

Sixth Edition:

  • Chapter 1, pp. 1 - 16, 25 - 30
  • Chapter 2, pp. 33 -40

Fifth Edition:

  • Chapter 1, pp. 1 - 15, 26 - 31
  • Chapter 2, pp. 33 - 42

The class meets in the computer lab, EB 325. Refer to the lab exercise for downloads and information related to our in-class activity for today.


Learning Objectives

At the end of this week's lecture, lab and homework assignment, students should be able to

  • Launch MATLAB in any of the MCECS computer labs
  • Perform basic calculations in the MATLAB command window
  • Store MATLAB commands in function m-files for re-use
  • Create vectors and evaluate expressions involving vectors
  • Plot
  • Include a MATLAB plot in a word-processing document

What are we going to do in this course?

  • Use MATLAB, and more generally numerical analysis techniques, to build models of engineering components and systems

See also Three Main Ideas in ME 350.

What do I assume you know?

  • Calculus, differential equations, series
  • Basic understanding of computer architecture and networks
    • What is a hard drive?
    • What is a server?
    • How to store, retrieve and organize files on storage media
    • Common file extensions
  • Basic idea of programming constructs (purpose if not exact syntax)
    • if/else
    • for and while loop
    • encapsulate code in a function (local variables, input/output parameters)

During class, we will review the programming constructs, but not the math or computer architecture.

How are we going to achieve this?

  • Weekly meetings in EB 325
    • Relatively brief lecture: goal is 30 minutes or less of lecture
    • Work problems based on lecture presentation – we call this "lab" time
  • Weekly homework

In Lecture 1 we start with a brief introduction to course objectives and logistics. We then dive into an introduction to MATLAB.

  • Be prepared by having your MCECS account activated.
  • Be sure you know your login name and password.

A Quick Example

To whet your appetite (or remind you of your prior exposure to MATLAB), suppose you want a function to evaluate roots of the quadratic equation

A MATLAB program to compute the roots of this equation is presented as one example on the Examples page.

Please study that example and make sure that you know how to

  • download the example function;
  • store the example function somewhere other than the default download directory;
  • run the code;
  • check the results with MATLAB, not with your calculator.

Refer to this detailed explanation.


How to be Successful in ME 350

To learn how to use MATLAB, and to be successful in this course I suggest that you regularly practice these activities

  1. Study the code.

  2. Practice doing all calculations in MATLAB

  3. Stay in the lab after class

  4. Come to office hours

Study Questions

Use the following questions to review the lecture material and develop your factual and conceptual knowledge of the course content.

  1. What do we mean when we say that all variables on the right hand side must be defined before they are used?

  2. In what way is "=" like a left-pointing arrow?

  3. What is the file extension for MATLAB function script files?

  4. What is the MATLAB expression for computing the sine of 30 degrees?

  5. What happens (what is the result?) of evaluating the square root of a negative number in MATLAB?


Document updated 2016-09-28.

Go back to the Lab page.