You are on page 1of 2

Technical College , Stella Maris Polytechnic

GENG 214 Test 1

Michael SB Gboneh: Course Instructor (michaelgboneh@aims.ac.za)

April 26, 2018

Question 1 is compulsory and do any 2

1 Question 1
Create the following expression in MathScript:

log(ax2 + bx + c) − sin(ax2 + bx + c)
f (x) = a = 1, b = 3, c = 5, f (9) =? (1)
4πx2 + cos(x − 2)(ax2 + bx + c)

2 Question 2
dy
Given the following differential equation: dx = ax where a = − T1 where T is a time constant. the
solution to the differential equation is
x(t) = eat x0 (2)
set t = 5 and the initial condition x(0) = 1 plot the solution x(t) in the time interval 0 ≤ x ≤ 25 add
grid, lengend and x label.

3 Question 3
Given the array A = [ 2 4 1 ; 6 7 2 ; 3 5 9], provide the commands needed to
a. assign the first row of A to a vector called x
b. assign the last 2 rows of A to an array called y
c. compute the sum over the columns of A
d. compute the sum over the rows of b
e. compute the standard error of the mean of each column of A (NB. the standard error of the mean
is defined as the standard deviation divided by the square root of the number of elements used to
compute the mean.)

4 Question 4
Given the arrays x = [1 4 8], y = [2 1 5] and A = [3 1 6 ; 5 2 7], determine which of the following
statements will correctly execute and provide the result. If the command will not correctly execute,
state why it will not.

1
a. x + y
b. x + A
c. x’ + y
d. A - [x’ y’]
e. [x ; y’]
f. [x ; y]
g. A - 3

5 Question 5
Given a vector, t, of length n, write down the MATLAB expressions that will correctly compute the
following: a) ln(2 + t + t2

b) et (1 + cos 3t)

c) cos 2t + sin 2t

d) tan−1 (1)

e) cot(t)

f) sec 2t + cot(t) − 1

6 Question 6
plot the expression (determined in modelling the growth of Liberia population
197, 273, 000
p(t) = (3)
1 + e−0.0313(t−1913.25)
where t is the date, in years AD, using t = 1790 to 2000. What population is predicted in the year 2020?
”The trouble with the rat race is if you win you are still a rat, so run with lions even if you lose you are
a lion”

You might also like