Download presentation
Presentation is loading. Please wait.
Published byRodger Hancock Modified over 9 years ago
1
Introduction ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne
2
206_C12 Admin Course materials available online http://faculty.citadel.edu/hayne/ http://faculty.citadel.edu/hayne/ Students are encouraged to print lecture slides in advance and use them to take notes in class
3
206_C13 Course Outline Intro Ch 1 C++ Simple C++Ch 2 Control StructuresCh 3 Data FilesCh 4 Modular ProgrammingCh 5 ArraysCh 6 MatricesCh 7 Test #1 Test #2
4
206_C14 Course Outline MATLAB IntroCh 1 MATLAB EnvironmentCh 2 Predefined FunctionsCh 3 PlottingCh 4 ProgrammingCh 5 Control StructuresCh 5 Matrix ComputationsCh 6 Test #3 Test #4
5
206_C15 Grading Projects, Homework, Quizzes25% Tests (4)50% Final Exam25% All individual work!
6
206_C16 Course Software C++ Dev-C++ Bloodshed Software Free MATLAB MATLAB & Simulink Student Version The MathWorks
7
206_C17 Questions?
8
206_C18 Computing Systems Computer Machine designed to perform operations specified by a program Hardware Computer Equipment Keyboard, mouse, hard disk, printer,... Software Programs that describe the steps for the computer to perform
9
206_C19 Computer Hardware Internal Memory External Memory Processor ALU CPU OutputInput
10
206_C110 Computer Software Operating System Interface between user and hardware Application Software Word Processors, Spreadsheets, Databases,... Computer-aided Design (CAD) Mathematical Computation Tools (MATLAB) Computer Languages Machine Language Assembly Language High-level Languages (C++)
11
206_C111 Program Execution Compiler Converts source program to object program Linker Converts object program to executable program Compile Link/ Load Execute (run) Input data Program output Machine language program C++ program
12
206_C112 Problem-Solving An Engineering Problem-Solving Methodology Problem Statement Input/Output Description Hand Example Algorithm Development Testing
13
206_C113 Example Problem Statement Compute the straight-line distance between two points in a plane Input/Output Description Point 1 (x1, y1) Point 2 (x2, y2) Distance (d)
14
206_C114 Example Hand Example p1 = (1, 3) p2 = (4, 7) Algorithm Development (outline) Give values to the two points Compute lengths of two sides of right triangle Compute distance between points (hypotenuse) Print distance between points
15
206_C115 C++ Program /*-----------------------------------------------*/ /* Program chapter1_1 */ /* */ /* This program computes the distance between */ /* two points */ #include using namespace std;
16
206_C116 C++ Program int main() { // Declare and initialize objects double x1(1), y1(3), x2(4), y2(7), side1, side2, distance; // Compute sides of right triangle side1 = x2 - x1; side2 = y2 - y1; distance = sqrt(side1 * side1 + side2 * side2);
17
206_C117 C++ Program // Print distance cout << "The distance between the two points is " << distance << endl; // Windows friendly exit system("PAUSE"); return 0; } /*----------------------------------------------*/
18
206_C118 Testing
19
206_C119 End of Lecture Administration Introduction
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.