You are on page 1of 17

Engineering

Education
EngE 1114, Spring 2014




Exploration of Engineering Design
EngE 1114

Graphics Communication
 Hand Sketching
 Computer Aided
Design/Drafting
(INVENTOR)
Design
 Teamwork
 Project Management
 Design Process

 Algorithm Development
 Flowcharting
 Programming in MATLAB

Start
MATLAB
Engineering
Education
th
Locations TBA
Requires your tablet, fully charged
Closed book, notes, internet: just you and Inventor
You will be given a properly dimensioned
engineering drawing (multi-view) with a pictorial.
You will then create the object in Inventor and
SUBMIT that ‘ipt’ file via a Scholar link. The test
should take 60 minutes, but you will be given 45
90.
Engineering
Education

Programming ‘module’ topics
Algorithm Development
Flowcharting
Sequential programming with MATLAB 2013b
Timeline
• Feb 21-27 Intro
• Algorithm development
• Flowcharting basics
• MATLAB basics and script files
• Feb 28- Mar 6
• Decision structures
• Logical and relational operators
• March 7 – 20
• Spring break
• Repetition structures
• Summing and averaging
• Ensuring valid input
• March 21-27
• User defined functions
• March 28 – April 3
• Vectors

LECTURE
INVENTOR Test Feb 27
th

MidTerm Test March 27
th

MATLAB Test April 3rd
Engineering
Education
Why should engineers know how to write a
computer program?
Engineering
Education
Rationale for Learning Algorithm
Development/Programming
• Computers are routinely used in all
fields of engineering to help solve
problems.
• Upper level courses in most departments
will require the use of a computer to generate
results (answers) for some problems.
• Programming can be a important tool in design,
especially in the preliminary and detail design phases.
• Developing an algorithm is a good problem solving
technique. Algorithms are independent of specific
input values.




Graphics Communication
 Hand Sketching
 Inventor
Design
 Teamwork
 Project Management
 Design Process

Algorithm Development
 Flowcharting
 Programming in
MATLAB
Engineering
Education
Engineering
Education
n: an effective procedure,
a way of getting something
done in a finite number of
discrete steps.*
* The Advent of the Algorithm, David Berlinski,
Harcourt, Inc., New York, 2000, pg xvi.
We will write algorithms as a way to provide
step by step instructions for solving a problem.
A precursor to writing programming code for a
computer
Engineering
Education
Example MATLAB program via ‘target1’:
Examines the trajectory of a pingpong ball into a trash can
What must be considered? List parameters
LECTURE














Engineering
Education
Required elements:
1. Problem ID
2. Brief statement of what algorithm will do
 in your own words
3. A diagram for the problem, when appropriate
 a sketch is fine
4. Flowchart (copy and paste from VISIO)
5. Program listing (copy and paste from MATLAB)
6. Sample Output (copy and paste from MATLAB)
7. Discussion
 You are expected to check the output from your program
to see that it makes sense. Acknowledge any
“unexpected” results.
 Acknowledge any error messages
Homework format:
LECTURE
Engineering
Education
In-class problem:
• Produce an algorithm that will determine the volume
and surface area of a sphere given the diameter.
• Sketch the flowchart on your PPT panel.
Engineering
Education
Sphere Vol and SA flowchart….try Visio
Engineering
Education
Sphere Vol and SA flowchart….try MATLAB
But first………….
Engineering
Education
Some MATLAB basics:
Command Line commands:
• Assignments
• Variable names
• Case sensitivity
• Semicolon
• % up-and-down arrows
• Pi
• + - / * ^
• Algebraic hierarchy
• Sequential programming
• i.e. one line at a time
• Screen areas
• Path
• clc
• Clear
• Script files

Engineering
Education
Script Files
• File Names
• Input statements
• Vname=input(‘literal string’);
• Inputs are assignment
• Output statements
• fprintf
• Literal strings
• Format specifiers
• %f
• %M.Nf
• M is number of columns
• N is digits to right of decimal
• These % signs are NOT comments
• General form of fprintf is:
fprintf(‘literal string info’, vname1, v2, x3)
• The literal string includes text and format
specifiers.
Engineering
Education
Review student code:
Add the following two lines to the end of your program:
load handel
sound(y,Fs)

Then………..
• Turn on your speakers
• type file name at command prompt OR
• select ‘debug and run’ from editor
• Enter a diameter
Go…….

halleluiah
´ , ·.· ··· ··!· ·
·· ·.·· · · · , ·· /·
· , ¸··
Engineering
Education
Listen to the voiceover files associated with your homework. They represent
your ‘free’ textbook for MATLAB and flowcharting.

Other resources are available via the bookstore or Newman Library.


Other notes:
• Questions about homework, workshops and grades should be first
addressed to your workshop leader (or any of the workshop leaders)
• When emailing me or your WSL you must include your name, the course
and section, and a subject. Be patient, ENGE1114 has 740+ students in
addition to other classes and responsibilities.

Programming: Quiz#7456:

1. The flowchart symbol for a
‘process’ is:
A. Rectangle
B. Parallelogram
C. Ellipse
D. Triangle
2. The flowchart symbol for a
‘repetition structure’ is:
A. Rectangle
B. Parallelogram
C. Irregular hexagon
D. Diamond
3. The flowchart symbol for ‘input’ or
‘output’ is:
A. Diamond
B. Parallelogram
C. Rectangle
D. Ellipse

4. The ‘fprintf’ command is used to:
A. Save values
B. Print the current page
C. Print highlighted entities
D. Send output to a printer/device
5. The ‘%’ symbol at the end of a line
means:
A. What follows is a comment
B. the line should be ignored
C. Store values from line
D. Output values to the printer
6. Which of the following is/are invalid
variable name(s):
A. Diamond
B. Flow-chart
C. nOnAme
D. maroONANdorange
E. 12Times
F. Items B and E are invalid names
7. Which of the following format specifiers
will display the value of ‘pi’ as 3.1416
A. %f B. %0.f
C. %1.5f D. %7.4f
E. %%1.4f F. f5.5%