EECE 231 Introduction to Programming Using C+ and
MATLAB
Programming Assignment 4
October 1, 2014
This programming assignment consists of 3 problems.
It is due at the beginning of the next lab session by 3:00 pm. You are required to submit your
solution
EECE 231 Introduction to Programming Using C+ and
MATLAB
Programming Assignment 6
October 23, 2014
This programming assignment consists of 4 problems.
It is due at the beginning of the next lab session by 3:00 pm. You are required to submit your
solutio
/Assignment 4
/Problem 3
/Author: Maya Safieddine
#include <iostream>
using namespace std;
/list of functions signatures in order to access them from main before their
full implementation after the main function.
int sequentialSearch(int A[], int n, int x
EECE 231 Introduction to Programming Using C+ and
MATLAB
Programming Assignment 9
November 19, 2014
This programming assignment consists of 3 problems.
The due date will be specied by the instructor. You are required to submit your solutions of
the lab
EECE 231 Introduction to Programming Using C+ and
MATLAB
Programming Assignment 7
October 30, 2014
This programming assignment consists of 3 problems.
It is due at the beginning of the next lab session by 3:00 pm. You are required to submit your
solutio
EECE 231 Introduction to Programming Using C+ and
MATLAB
Programming Assignment 8
November 6, 2014
This programming assignment consists of 2 problems.
The due date will be specied by the instructor. You are required to submit your solutions of
the lab a
EECE 231 Introduction to Programming Using C+ and
MATLAB
Programming Assignment 5
Updated on Wed Oct 15
October 15, 2014
This programming assignment consists of 5 problems.
It is due at the beginning of the next lab session by 3:00 pm. You are required
EECE 231 Introduction to Programming Using C+ and
MATLAB
Programming Assignment 3
September 24, 2014
This programming assignment consists of 4 problems.
It is due at the beginning of the next lab session by 3:00 pm. You are required to submit your
solut
EECE 231 Introduction to Programming Using C+ and
MATLAB
Programming Assignment 2
September 17, 2014
This programming assignment consists of 5 problems.
It is due at the beginning of the next lab session by 3:00 pm. You are required to submit your
solut
EECE 231 Introduction to Programming
Using C+ and MATLAB
Programming Assignment 1
September 8, 2014
Introduction
Your lab instructors will guide you on how to start your development environment and make it ready so that you can use it to write programs. U
Department of Electrical and Computer Engineering
Faculty of Engineering and Architecture
American University of Beirut
Course Information
Course title: Introduction to Programming Using C+ and MATLAB
Course number: EECE 231
Catalog description:
An introd
#include <iostream>
using namespace std;
int main ()
cfw_
int a[1000];
int i=0,j=0;
int n;
cout<"enter the number of entries: ";
cin>n;
while (i<n) cfw_
cin>a[i];
i+;
int minindex;
int temp;
i=0;
while (i<=n1) cfw_
int j=i+1;
minindex=i;
while (j<=n1)
Numerical Methods Course Notes
Version 0.11
(UCSD Math 174, Fall 2004)
Steven E. Pav1
August 21, 2012
1
Department of Mathematics, MC0112, University of California at San Diego, La Jolla, CA 920930112.
c 20042006 Steven E. Pav. Permission is granted to
C+ Programming:
Functions
Some material taken from: C+ Programming: Program Design Including Data Structures
Objectives
Learn about standard (predefined) functions
and discover how to use them in a program
Learn how to write your own functions
Learn ab
EECE 231 Introduction to Programming Using C+ and
MATLAB
Programming Assignment 10
November 27, 2014
This programming assignment consists of 3 problems.
It is due at the beginning of the next lab session by 3:00 pm. You are required to submit your
solut
EECE 231 Introduction to Programming Using C+ and
MATLAB
Programming Assignment 11
December 3, 2014
This programming assignment consists of 2 problems (+ 1 optional problem).
It is never due but it covers material included in the nal exam.
Related Read
EECE 231: F ILES R EADING AND
W RITING
R EADING : B IELAJEW, S ECTION 9.4
M ATLAB HELP FOR FILE READ / WRITE
FUNCTIONS
Oct 1, 2014
Electrical and Computer Engineering (ECE)

EECE 231
O BJECTIVES
Learn the concept of a le as a basic unit of storage.
Readi
/*
* course: EECE 231
* Lab: 3
* Problem: 4b
* author: Ameen Jaber
*/
#include <iostream>
using namespace std;
int main() cfw_
/ Declare variables
int n;
/ Read the possible sum of two squares number from the user
cout < "Please enter an integer: ";
cin
cplusplus.com
C+ Language Tutorial
Written by: Juan Souli Last revision: June, 2007
Available online at:
http:/www.cplusplus.com/doc/tutorial/
The online version is constantly revised and may contain corrections and changes
The C+ Language Tutorial
This d
C+ Programming:
Control Structures
Some material taken from: C+ Programming: Program Design Including Data Structures
Objectives
Learn about control structures
Examine relational and logical operators
Explore how to form and evaluate logical
(Boolean)
C+ Programming:
Basic Elements of C+
Some material taken from: C+ Programming: Program Design Including Data Structures
Objectives
Become familiar with the basic components of
a C+ program, including functions, special
symbols, and identifiers
Explore s
C+ Programming:
Arrays
Some material taken from: C+ Programming: Program Design Including Data Structures
Motivation
Consider the following problems:
Read a large list of numbers and print it in
reverse order
Sort a large list of numbers
Need to store
C+ Programming:
Overview of computers and
programming
Some material taken from: C+ Programming: Program Design Including Data Structures
Outline
Hardware components of a computer system
Highlevel programming languages
Edit, Compile, link, execute
Alg
EECE 231: G RAPHICS 2D AND 3D PLOTS
R EADING : B IELAJEW, C HAPTER 12
M ATLAB HELP FOR GRAPHICS AND 3D
VISUALIZATION
Oct 1, 2014
Electrical and Computer Engineering (ECE)

EECE 231
O BJECTIVES
Go over the basic graphics support in Matlab.
Illustrate 2D
EECE 231: R ECURSION
R EADING : B IELAJEW, S ECTION 9.3
A DDITIONAL REFERENCES : M AILK , C HAPTER 16
Oct 1, 2014
Electrical and Computer Engineering (ECE)

EECE 231
O BJECTIVES
Learn recursive denitions
Learn base and general cases in a recursive deniti
EECE 231: S YMBOLIC M ATH
M ATLAB HELP FOR SYMBOLIC MATH
Oct 1, 2014
Electrical and Computer Engineering (ECE)

EECE 231
O BJECTIVES
Appreciate how symbolic computation works
Learn Matlab basics for symbolic computations
Learn how to integrate, different
The Towers of Hanoi
Authors: Martin Hofmann and Berteun Damman
The idea and visualization were by Martin Hofmann, Berteun
Damman programmed the actual recursion.
Tower of Hanoi 1 Disc
1
Tower of Hanoi 1 Disc
1
Moved disc from pole 1 to pole 3.
Tower of Ha
EECE 231: I NTRODUCTION TO M ATLAB :
PART II
R EADING : B IELAJEW, C HAPTER 11
Oct 1, 2014
Electrical and Computer Engineering (ECE)

EECE 231
O BJECTIVES
Introduce Matlab terminology
Introduce loops in Matlab
Introduce control structures in Matlab
Intro
EECE 231: I NTRODUCTION TO M ATLAB
R EADING : B IELAJEW, C HAPTER 11
Oct 1, 2014
Electrical and Computer Engineering (ECE)

EECE 231
O BJECTIVES
Introduce the Matlab environment
Illustrate that Matlab is an interpretation program
Understand data represen
EECE 231: G RAPHICS 2D AND 3D PLOTS
R EADING : B IELAJEW, C HAPTER 12
M ATLAB HELP FOR GRAPHICS AND 3D
VISUALIZATION
Oct 1, 2014
Electrical and Computer Engineering (ECE)

EECE 231
O BJECTIVES
I
Go over the basic graphics support in Matlab.
I
Illustrate