Lecture 0
Lecture
Preface
Lecture series based on the text:
Essential MATLAB
for Engineers and Scientists
for
By
By
Hahn & Valentine
Hahn

Objectivesofafirstcourse
Objectivesofafirstcourse
Learnhowtoevaluateandexplorecapabilitiesof
MATLAB.
Learnhowtodote
King Saud University
Electrical Engineering Department
GE211: Programming in C +
Final exam
College of Engineering
First semester 2015/2016
Time allowed 2 hours

Name:
Number:
=
=
Question 1
a) True or False? [ 8 points]
In C+, & is called the address of
King Saud University
College of Engineering
nd
Electrical Engineering Department
Final Exam
2 semester 1436/1437H
GE211: Programming in C +
Time allowed 2 hours

Answer ALL Questions
Question 1:
[10 points] Choose the correct answer
1. Which control stat
GE211 Programming in C+
Lab (5)
Objectives of this lab:
Learn about I/O streams.
File name as Input.
End of file (eof) and appending to file (app).
Exercise 1:
From Lab 1 we will recall this problem:
Write a program that converts degrees Celsius (TC) to d
GE211 Programming in C+
Lab (3)
Objectives of this lab:
Learn about Simple if and ifelse statement.
Simple loop mechanism.
Basic conditional loop thinking
Exercise 1: Cola Machine
Write a program that presents the user w/ a choice of your 5 favorite drin
Final examination revision  202 CSc.
Question 1
Use MATLAB to evaluate the following expressions.
1. 1000(1 + 0.15/12)60
2. (0.0000123+5.678103)0.4567104
Solution :
1.
1000*(1+0.15/12)^60
2.
(0.0000123+5.678*10^(3)*0.4567*10^(4)
Question 2
Set up a vec
Midterm Revision:
Q1
Use Matlab array operations to:
Add 1 to each element of the vector [2 3 1]
[2 3 1]+1
multiply each element of the vector [1 4 8] by 3
[1 4 8]*3
Find the array product of the vectors [1 2 3] and [0 1 1]
[1 2 3].*[0 1 1]
Square ea
King Saud University
Electrical Engineering Department
GE211: Programming in C +
Final Exam
College of Engineering
First semester 2014/2015
Time allowed 2 hours

Name:
Number:
=
=
Question 1
a ) [ 4 points] Consider the following matrix, answer the follo