This preview shows pages 1–3. Sign up to view the full content.
P = hf  ½ mv
2
P = I
2
R
Sample Exam Questions Solutions
Problem #1
(4 points each)
Given the MATLAB commands below:
>> a = [ 1 , 2 ; 8 , 9 ]
>> b = [ a(:,2) a(:,1) ]
a)
What values populate
a
after the first line of code?
=
a
1289
b)
What values populate
b
after the second line of code?
=
b
2198
Problem #2
(4 points each)
Given the MATLAB commands:
>> S = [0:5:35]
>> S = S.^2
a)
What is the value of S(3)?
100
b)
How many numbers does the vector S contain?
8
Problem #3
(4 points)
Which of the following MATLAB commands will result in MATLAB producing an error? (Circle all
that apply.)
a) 5 = a
b) plot( x , y , ‘line’ )
c) G = 5.*G + 1
d) b = log(0)
e) 1stdatarun = [18.2 18.5 18.3 18.2]
f) H(1,2) = 5
Problem #4
(4 points each)
In the photoelectric effect, light may cause electrons to be ejected from a metal surface. The equation
below calculates
P
, the work to remove the electron from a material (its work function):
Where
m
is the electron mass,
v
is the velocity of the ejected electron,
f
(the frequency of the incident
light, and
h
is the Planck’s constant.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document a)
What formula can be typed into cell F3 and copied to cells F4:F8 to calculate the work function
of each material from electron velocities in E3:E8 and constants in column A?
=$A$2*$A$8 – (1/2)*$A$5*E3^2
b)
Write a formula that can be typed into cell E9 to calculate the average/mean electron
velocity of these surface materials so that the formula could be copied to F9 to compute the
average/mean work function for these materials.
=AVERAGE(E3:E8)
c)
Complete this script with MATLAB code to calculate the work function of each material.
% Input Section
h = 6.63e34
% Planck’s constant
m = 9.11e31
% electron mass
f = 1e17
% light frequency
v= [ 1.1993e7
1.1987e7
1.2001e7
1.1988e7
1.1968e7 1.1992e7]
% electron velocities
% Calculation Section
work = h*f – (1/2)*m*v.^2
d)
How would we change the code in c) to prevent the assignment of
h, m, f,
and
v
from displaying
in the command window?
Put a SEMICOLON at the end of each line
e)
Write the MATLAB commands to produce a plot of the relationship between work function and
electron velocity. Make sure your plot is suitable for presentation.
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 02/20/2012 for the course ENGR 195 taught by Professor Staff during the Spring '08 term at Purdue UniversityWest Lafayette.
 Spring '08
 Staff

Click to edit the document details