Вы находитесь на странице: 1из 4

CHEE/CIVE/INDE/1331: Engineering Computing - Spring, 2014

Exam 2 (Version A Special Code: K1).


5 points per question, machine scored.
Please KEEP this paper and mark your answers on it! Scantrons will not be returned.
This document is your record of your answers. NO CALCULATORS.
1. Which Gaussian distribution curve below has the greatest fraction of its total integrated value, at x values
more than 2 standard deviations above x = 10?

a.
b.
c.
d.
e.

Curve 1
Curve 2
Curve 3
All are the same
Cannot be determined with the information given

2. A natural exponential function crosses the Y axis at Y = 1 (the actual value of the function is 1; this is not
because of the semi-log plot) when plotted on a semi-log plot with a logarithmic Y axis. What is the
value of this function when the exponent (which may consist of more than one factor) is equal to one?
a. 0
b. 1
c. 2.7
d. 3.1
e. Cannot be determined with the information provided

3. In fitting an equation to a set of data, which of these regions of the plot is most informative in deciding
the functional form?
a. (1,1)
c. (1,0)
e. (0, limit toward infinity)
b. (0,1)
d. (0,0)

4. Functions for which you have the governing equation are plotted using which of the following?
a. Many symbols
b. Many symbols and a line
c. A line, with no symbols
d. It depends on the shape of the function
e. None of the above

5. What is the number of values generated by this code, and their approximate average value
12*rand(1,26)+14 ?
a. 26, and 14
c. 14, and 6
e. 6, and 20
b. 26, and 6
d. 26, and 20

6. What value of a determinant is most informative?


a. 0
b. 1
c. The number of rows in the coefficient matrix
d. The number of columns in the coefficient matrix
e. The total number of columns and rows in the coefficient matrix

7. What is the sum of the values of x and y which would be calculated using left-division on this system?
2x + 3y = 13
3x + 2y = 12
a. 5
b. 12

c. 13
d. 25

e. 30

8. A manufacturing process makes a part with the specifications given below. The minimum tolerable part
diameter is 2 standard deviations below the mean diameter. What is one of the ways to write code in
order to calculate the probability that the diameter of a part will be less than the minimum allowed
tolerance?
Given:

Normal distribution
Mean diameter of part = 5.00 cm
Standard deviation of part = 0.04 cm
(
)
( )]
[

a.
b.
c.
d.
e.

P = (1/2)*(1+erf((5.08-5.00)/(0.04*sqrt(2))))
P = 1-(1/2)*(1+erf((4.92-5.00)/(0.04*sqrt(2))))
P = 1+(1/2)*(1+erf((4.92-5.00)/(0.04*sqrt(2))))
P = (1/2)*(1+erf((4.92-0.04)/(5.00*sqrt(2))))
P = (1/2)*(1+erf((4.92-5.00)/(0.04*sqrt(2))))

9. Which function should be plotted on a log-log plot to show linear dependence?


a.
b.
c.

( )

d.
e.

(
( )

10. Which of these is matched at each data point, using a cubic spline function?
a. Third derivatives
b. Coefficients

c. First derivatives
d. None of the above

e. Integrals

11. What are the values of these expressions (~(0&1)) || (1&1) and 0||~1||(1&0)&(0&1)
(If it helps, you may treat || as being the same as | in this problem).
a. 0 and 0
b. 0 and 1

c. 1 and 0
d. 1 and 1

e. Not possible to tell

12. Consider the script file below:


i = 0;
j = -1;
x = 0;
y = 2;
while i <= 5
y = x^2 + x - 5;
if y < j
j = y;
end
x = x + 1;
i = i + 2;
end
What are the FINAL values of j and y?
a. j = -5, y = 1
c. j = -5, y = -3
b. j = -5, y = -5
d. j = -4, y = -3

e. j = -1, y = 2

13. We want to determine how long it will take to accumulate at least $10,000 in a bank account if you
deposit $500 initially and $500 at the end of each year, if the account pays 5 percent annual interest. If
you want to solve this problem using the code below, one more statement is needed inside the while loop.
Amount = 500;
k = 0;
while amount < 10000
amount = amount*1.05 + 500;
end
Which of these characters needs to be in that statement?
a. e
b. a
c. >

d. |
e. +

14. If X and Y are defined as follows:


X = [1 0 4 -3 0 8 6];
Y = [0 1 4 -2 8 2 5]
q = find(X & Y)
What is the value of the first (or only, if there is only one) element of q?
a. 0
c. 2
e. 4
b. 1
d. 3

15. If A = [1 1 1 3 5] and the values in A are to be plotted in a scaled frequency histogram with bins 0-2, 2-4,
and 4-6, what is the sum of the Y values (heights) of the bins in the histogram?
a. 1Correct answer is 0.5
c. 5
e. 0
b. 3
d. 11

16. Here is a piece of code that operates like the find command. Which character(s) could reasonably
replace the XXX?
m = 0;
for k = 1:length(x)
if abs(x(k)) > 0
m = m +1
y(m) = XXX;
end
end
a. k
b. y(k)

c. m
d. x(k)

e. m + k

17. Which of these is a good number of tick marks for a plot axis?
a. 0
c. 1
e. 2
b. 8
d. 100
18. What is a residual?
a. the remaining elements after a find command is run
b. the left-overs from a data selection
c. the difference between a power and an exponential function
d. the elements of a matrix after subtraction of the identity matrix
e. the difference between a data point and a fit

19. If p is [1 2 3] and x is [1 2 6], what is the first element of polyval (p,x)?


a. 2
c. 4
e. none of these
b. 3
d. 6

20. What is a reasonable size for an "error bar" to be added to an X, Y plot?


a. the X value
d. the square root of the variance of Y
b. the Y value
e. none of these
c. the sum of X and Y

Вам также может понравиться