Name: ________________________________________
Section: ______
Type your Active Directory (AD) password in the box marked
'Password:'. Your
AD password is the one used for Netfiles and to log into many machines
on
campus. Note: This password isn't necessarily the same as your Cites
E-mail
password or your bluestem (NetID) password.
If you do not have an AD password, you may reset it at the following
link:
http://accounts.ad.uiuc.edu
This information will be used by your TA to set up your Lab groups and Lab activities.
What do you hope to learn in CS101?
__________________________________________________________________
What is your major? _____________________________________
Have you programmed before, if so for how long, with what language(s)?
_______________________________________________
Have you used UNIX/LINUX before(yes/no)? _______________
Return to the instructions on the web.
1. _______________________ ( think 1 over
3)
2. _______________________ (think 1 under 3)
3._______________________ (exponentiation 2 raised to the
fifth power)
4. _______________________ (operator precedence)
5._______________________ (parenthesis can change operator
precedence)
6.______________________ (check your Calculus book on
the following)
7.______________________
8.______________________
9.______________________
10.______________________
11.______________________
12.______________________
13.______________________
14.______________________
______________________ (Check your high school
algebra book on
the imaginary number i .)______________________ (The general form of a complex
number is "a+bi"
where a and b are real numbers.)______________________ (no * is needed with the
imaginary part)_______________________ (addition of complex numbers)_______________________ (multiplication of complex
numbers)_______________________ (division of complex numbers)
______________________
22. _______________________
23._______________________ (the two vectors are of
the same
length but not the same size)
24.______________________
25._______________________
26._______________________
27.______________________
28._____________________ (didn't we assign [1 1 1] to x???)
29._____________________
_____________________ ( equally spaced vector starting
at -1 ending
at 1 with 4 values)31.______________________ (of course!)
32.______________________
33.____________________
34.____________________
35.____________________ (sums values in columns for a
table; nearly all
Matlab functions work this way on tables)
36. _____________________ (diff(x) consecutive
differences of
values in x)
37._____________________(arithmetic average = (1+2+3)/3)
38.______________________( median(x) = as many values
above as are
below)
39._____________________
40._____________________ (cumulative sum)
41.______________________
42.______________________ ( abs( a+bi) = sqrt(a*a +
b*b) )
You should read the instructions for Part 6 and create a Matlab script file before you attempt the following:
43. Before we run the script file, in the Matlab environment,
enter the who command, which lists all your variables:
>> who
List the variables: (Write "Nothing" if no variables appear)
_______________________________________________________________________
44. Now type the following,
>> clear
>> who
List the variables:
_______________________________________________________________________
45. Next type,
>> r = 1;
>> who
List the variables:
_______________________________________________________________________
>> r
46.
What is the value of r? _________
Use the "what" system command to make sure that you have correctly saved your lastname.m file.
>> what (this lists the .m and .mat files in your directory)
If you don't see the "lastname" file ask your TA for help before you proceed.
47. Run the script by typing your last name at the prompt.
Write what is displayed on your screen:
________________________________________________________________
48. Type
>>r
What is the value of r? _________
49. So, can running a script alter the value of a workspace variable? Y / N
50. Again, type
>> who
List the variables in your workspace:
_____________________________________________________
51. Compute the derivative of t3 with respect to t,
>> syms t
Note: When you execute the syms command, you may see a
page of red text. If you
do, please restart Matlab.
>> solution = _______________________________
(The solution should be
6t, but you should
write the
command
used to find the solution.)
52. Write the result of executing the following code,
>> syms y
>> limit(sin(y) / y, y, 0)
___________________________
53. Write the result of executing the following code,
>> syms z
(this is called the fourth derivative of sin(z) with respect
to
z)
>> diff(sin(z), z, 4)
____________________________
54. Find in the course syllabus: Find the
grade
range(in points) for an A- grade for CS101:
____________________________________
55. Click the "Staff " hyper-link: What is the email address of your lab TA?
56. Follow the instructions in Part 9.
Then, obtain the signature of your TA and submit this answer sheet to
your
lab TA.
_______________________________________________