Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

42) What is the result when the command factorial(S.3) is executed in MATLAB? a)

ID: 3730950 • Letter: 4

Question

42) What is the result when the command factorial(S.3) is executed in MATLAB? a) 120 b) 120.58 c) 125 d) 240 e) MATLAB will yield an errer 43) Which of the following variable names are valid in MATLAB? a) catch b) throwe) 44throw d) both a and b e)all of the above 44) The variable, j, in MATLAB a) is initially undefined and must be defined by assigning a value to it b) is not a valid variable name in MATLAB c) is a pre-definod variable with an initial value that can be reassigned a new value d) is a pre-defined variable with an initial value that cannot be reassigned a new value c) is a variable that can only be assigned to a real number 45) Which of the following commands will create a column vector in MATLAB? a) linspace(4,10,7) b) linspace(4,10,7) c)linspace(4,10,7) e) none of the above d) both b and c Questions 46-50 are based on the following array assignment 4 5678 9 10 X- 2 46.8 10 12 14 46) Which of the following commands will assign the third row of matrix X to the variable Y? 47) Which of the following commands will assign the second column of matrix X to the variable Z? a) Z-x,2) b) Z-X(,2:2) c)Z-X(2,2) d)Z-X(12,2) c)Z-X(2,) 48) Which of the following commands will assign the value of 14 of matrix X to the variable W?

Explanation / Answer

42)factorial(5.3)
e) MATLAB will yield an error
because the parameter for function factorial should be an integer

43)
d) both a and b
44throw isn't a variable name because it shouldn't start with a number. It must be either a letter or an underscore

44)
a) j is initially undefined and must be defined by assigning a value to it
because j is just like any variable that can be created

45)
c) linspace(4, 10, 7)'

linspace(4, 10, 7) = 4 5 6 7 8 9 10

a = linspace(4; 10; 7) is invalid

linspace(4, 10, 7)' =
4
5
6
7
8
9
10

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote