Problem Solving With Matlab: CPET 190
Problem Solving With Matlab: CPET 190
Lin 1
CPET 190
Lecture 1
Problem Solving with
MATLAB
http://www.etcs.ipfw.edu/~lin
August 22, 2005 Lecture 1 - By P. Lin 2
Lecture 1: Introduction
Introduction Objectives of the Course
Course Syllabus and Class Objectives
Problem Solving
What is a Problem & Problem Solving
Why Teach Problem Solving
Types of Problems
Collaborative, Team-Based Problem Solving
Problem Solving with a Computer
Define the problem
Formulate a mathematical model
Develop an algorithm
Write the codes for the problem
Test program and verify the solution
Document the program and solution
August 22, 2005 Lecture 1 - By P. Lin 3
Lecture 1: Introduction (continue)
Introduction to MATLAB
What is MATLAB
The Advantages of MATLAB
Disadvantages of MATLAB
The MATLAB Environment
A Sample MATLAB Session
Example 1: Calculate I = watt/volt
Example 2: Calculate the area of a circle with a
radius of 0.001 inch ( r2).
Example 3: Sum of 12 numbers with continue
statement on successive lines by typing an
ellipsis () at the end of the first line
August 22, 2005 Lecture 1 - By P. Lin 4
Syllabus
WebCT: http://webct.ipfw.edu/
Web Site:
http://www.etcs.ipfw.edu/~lin
Email: [email protected]
Test Date
Grading
August 22, 2005 Lecture 1 - By P. Lin 5
Course Outcomes
1. Knowledge and skills of using MATLAB as a practical,
technical problem solving tools (Criterion 2, Item a)
2. An ability to apply problem solving sills in mathematics
and engineering technology problems (Criterion 2, Item b)
3. An ability to discuss ways and means of analyzing
technical data (Criterion 2, Item c)
4. An ability to practice technical problem solving process
including problem formulation, understand the problem,
problem analysis, collect data, model development,
algorithm development, solution implementation, solution
verification, and report/presentation (Criterion 2, Items c,
d, f, g)
5. Understanding of professional and ethical responsibility
(Criterion 2, Item i, j)
6. Understanding of the contemporary engineering
technology application issues (Criterion 2, Item k)
August 22, 2005 Lecture 1 - By P. Lin 6
Text Book & References
Text book:
MATLLAB Programming for Engineers, newest Edition, by Stephen
J. Chapman, 3
rd
., from Brooks/Cole Thomson Learning,
http://info.brrokscole.com/chapman
Computer, Software, Internet Connection:
MATLAB Student Version with SIMULINK, available for purchase
from The MathWorks, Inc., http://mathworks.com
Off campus students are required to have their own PCs, and
install Student version of MATLAB and SIMULINK.
Internet connection from home, IPFW, or work is required.
References
Math Problem Solving, John Hopkins University,
http://cty.jhu.edu/math/solving/
Mathworks MATLAB Examples,
http://www.mathworks.com/access/helpdesk/help/techdoc/m
atlab.shtml
MATLAB Basics -
http://www.maths.uq.edu.au/~mrb/tutors/matlabbasics.html
MATLAB Basic Tutorial,
http://www.engin.umich.edu/group/ctm/basic/basic.html
August 22, 2005 Lecture 1 - By P. Lin 7
Overview of the Course
Topics of Discussion
Problem solving definition, process, techniques,
strategies, tools, etc
MATLAB basics and advanced data types,
commands, script, functions, and program controls
Math Equations and their graphs
Elementary MATLAB Math functions and their
applications
Programming with MATLAB, File I/Os
MATLAB Problem Solving Applications in
Electronics and Electrical, Physics, Engineering
Technology, Data Analysis, etc
Problem Solving Projects: team-based, collaborative
problem solving
August 22, 2005 Lecture 1 - By P. Lin 8
Problem Solving
Definition of Problem Solving
What is a Problem
1,2
A situation, quantitative or
otherwise, that confronts an individual or group of
individuals for a specific purpose that requires
resolution, and for which the individual see no apparent
or obvious means or path to obtaining the solution.
What is Problem Solving
1,2
A process in which one
individual uses previously acquired knowledge, skills,
and understanding to satisfy the demands of an
unfamiliar situation.
Why Teach Problem Solving stimulate students to
practice critical thinking and prepares students to use
math, physics, science, and discipline specific
knowledge to solve real-world problems.
[1] Problem Solving, A Handbook for Teacher, by Stephen Krulik and Jesse
A. Rudnick, published by Allyn and Bacon, Inc., Massachusetts, 1980.
[2] Problem Solving Terminologies,
http://www.mediafrontier.com/Article/PS/PS.htm
August 22, 2005 Lecture 1 - By P. Lin 9
Problem Solving (continue)
Types of Problems
3
Well-Defined Problems
Solved using standard methods, methods of similar
problems, or methods of analog problems
Examples: puzzles, simple games, low-level math,
science, and engineering
ILL-Defined Problems
Unexplored problem domains
Not clear what the problem is and what the solution is
Approximate solution
Wicked-Defined Problems
Worse than ill defined problem
Contains contradictory requirements
Inventive/creative solutions
[3] Problem Solving, http://cs.wwc.edu/~aabyan/Design/probSolv.html
August 22, 2005 Lecture 1 - By P. Lin 10
Collaborative, Team-Based
Problem Solving
4
Today's industrial environments, problem solving
generally utilizes teams of people, from different
countries, with different backgrounds and
expertise to bring to bear on problems that often
cross over formation, processing, manufacturing,
distribution and marketing.
4
Not all technically correct answers are feasible in
commercial practice.
4
For example, a correct solution cannot be
implemented because it is contrary to the
marketing strategy for the product or that the
solution may require greater capitol expenditure
than is economically feasible
[4] Technical Problems and Problem Solving,
http://class.fst.ohio-
state.edu/fst696/696%20Technical%20Problems%20and%20Problem%20solving.htm
August 22, 2005 Lecture 1 - By P. Lin 11
Problem Solving with a Computer
5
Define the problem
Formulate a mathematical model
Develop an algorithm
Write the code for the problem
Test program and verify the solution
Document the program and solution
[5] Problem Solving with a Computer,
http://www.aspire.cs.uah.edu/textbook/introcomp6004.html
August 22, 2005 Lecture 1 - By P. Lin 12
Problem Solving in this Course
Needs
Basic skills of mathematics, electrical and
electronics
Critical thinking
MATLAB: Engineering and science
computing tool
August 22, 2005 Lecture 1 - By P. Lin 13
Introduction to MATLAB
What is MATLAB?
Short for MATrix LABoratory
Capable of solving any technical problems
A Special-purpose, interpreter-based, computer
program for technical computing and simulation,
engineering and scientific computing, numerical
computation and visualization without intensive
programming knowledge.
MATLAB computing environment
6
The company Mathworks www.mathworks.com.
[6] The MathWorks, http://www.mathworks.com/
August 22, 2005 Lecture 1 - By P. Lin 14
Introduction to MATLAB (continue)
The Advantage of MATLAB
Ease of Use
Platform Independence
Predefined Functions
Device-Independent Plotting
Graphical User Interface
MATLAB Compiler
Disadvantages of MATLAB
Interpreted language slow
Cost
August 22, 2005 Lecture 1 - By P. Lin 15
Introduction to MATLAB (continue)
The MATLAB Environment includes
Graphical user interface
MATLAB desktop and Command Window
A command history
An editor and debugger, and
A Browser for viewing help, the workspace, files,
and the search path.
August 22, 2005 Lecture 1 - By P. Lin 16
Introduction to MATLAB (continue)
MATLAB Desktop the main interface for working
with MATLAB
August 22, 2005 Lecture 1 - By P. Lin 17
MATLAB Electrical Calculator:
an Interactive Session
Start MATLAB
Example1: Enter the
following lines on the
MATLAB Command
Windows
>> watt = 100;
>> volt = 110;
>> i = watt/volt
i =
0.9091
Double Click the Command
in the Command History
Window
Workspace
Command
Window
Command
History
August 22, 2005 Lecture 1 - By P. Lin 18
MATLAB Electrical Calculator:
an Interactive Session (continue)
Example 2: Calculate the area of a
circle with a radius of 0.001 inch ( r
2
).
>> pi
ans =
3.1416
>> area = pi*0.001^2
area =
3.1416e-006
>>
August 22, 2005 Lecture 1 - By P. Lin 19
MATLAB: an Interactive Session
Example 3: Sum of 12 numbers with
continue statement on successive lines by
typing an ellipsis () at the end of the first
line
>> x = 1 + 2+3+4+5+6+7+8+9+10+11+12
x =
78
>> x = 1 + 2 + 3 + 4 + ...
5 + 6 + 7 + 8 + 9 + 10 + 11 + 12
x =
78
August 22, 2005 Lecture 1 - By P. Lin 20
Summary
Problem Solving
Problem Solving with a Computer
Introduction to MATLAB
A Sample MATLAB Session
Example 1: Calculate I = watt/volt
Example 2: Calculate the area of a circle
with a radius of 0.001 inch ( r2).
Example 3: Sum of 12 numbers with
continue statement on successive lines by
typing an ellipsis () at the end of the first
line
Next: Math Problem Solving with MATLAB
August 22, 2005 Lecture 1 - By P. Lin 21
Question?
Answers
Email: [email protected]