Professional Documents
Culture Documents
Lab 1 (Thu) - Attempt Review PDF
Lab 1 (Thu) - Attempt Review PDF
Dashboard / My courses / LE/EECS1560 A - Introduction to Computing for Mathematics and Statistics (Fall 2019-2020) / Lab 1 Material
/ Lab 1 (Thu)
Question 2 According to the on-line manual (main manual, not the toolkits) command clear
Incorrect
https://moodle.yorku.ca/moodle/mod/quiz/review.php?attempt=2367302&cmid=2169033 1/3
12/24/2019 Lab 1 (Thu): Attempt review
Question 3
When we read the following matlab statement aloud
Correct
A=1
Mark 1.00 out of
1.00 we say
Select one:
a. A is 1
b. A is exactly equal to 1
c. A becomes 1
e. A is equal to 1
b. has no effect
The correct answer is: merely indicates that we do not want to see the answer
Question 5 What happens after executing the following triplet of matlab statements
Incorrect
t = A;
Mark 0.00 out of
1.00 A = B;
B = t;
(Hint: assign some values to variables A and B and then execute this triplet (by cutting and pasting) in the command
window or a script. See what values A and B have now.)
Select one:
a. Makes both A and B equal to zero
b. Has no effect
https://moodle.yorku.ca/moodle/mod/quiz/review.php?attempt=2367302&cmid=2169033 2/3
12/24/2019 Lab 1 (Thu): Attempt review
c. paper and pencil, since this cannot be computed by a formula (or use AI and deep learning)
The correct answer is: function nchoosek which is the builtin matlab function for this
Question 7 Write a short matlab script that computes a binomial coefficient. The script assigns variables n and k two values (these
Complete should be 4 and 2 respectively when submitting but you should try other values to make sure your script is correct). It
Mark 5.00 out of then computes the binomial coefficient using the function factorial. Use no other built in function.The only value printed
6.00 by the script is the binomial coefficient.
Your script should start with a set of comments that include a short description of the script (one or two lines only), your
name, and today's date. Name the script Lab1.m. Write the script in the matlab editor.
Lab1.m
Comment:
Your answer is correct but the output should be only the value of the binomial coefficient. So, the letter"b" should not be
added.
Your header description is missing your name and date. (-1)
https://moodle.yorku.ca/moodle/mod/quiz/review.php?attempt=2367302&cmid=2169033 3/3