Help would be GREATLY appreciated. 1. If these commands are executed in MATLAB p
ID: 1824280 • Letter: H
Question
Help would be GREATLY appreciated.1. If these commands are executed in MATLAB
pi = pi/2
a = cos(pi)
Then a =
a. 1
b. 0.707
c. -1
d. 0
2. If vector a_odd has all odd numbers from 1 thru. 1001 (a_add = [1,3,5, 1001]) , in order to obtain a_odd, which command(s) is/are the correct one(s) (select all that apply)
a. a_odd = 1:2:1000
b. a_odd = 0:2:1001
c. a_odd = linspace(1,1001,501)
d. a_odd = 0:2:1000a_odd = a_odd + 1
e. a_odd = 1:2:1001
f. a_odd = 1:1001:2
g. a_odd = 1:2:1002
3. if b = logspace(1,10,10), then
a. b(6) = 403.43
b. b(6) = 100000
c. b(6) = 1000000
d. b(6) = 6
4. The general equation for the distance that a freely falling body has traveled (neglecting air friction) is
d = .5*g*t*t
Assume that g = 9.8 m/s2.
What is d for time = 90 seconds in meter?
5. If x = [1 2 5], y = 1:a:11 what "a" should be in order to have a value for this command z = x.*y
Answer
a. a = 6
b. There is no value for "a" that will make this command be executed without an error.
c. a = 5
d. a = 7
6. If b = logspace(2,8,10) then b is
a. Vector
b. 10x1 matrix
c. Scalar
d. Two-dimensional array
7. If the following commands are executed in MATLABa = [1:5;logspace(2,8,5)] a = a'How many rows are in a?
a. 3
b. 2
c. 5
d. 8
8. If b = -33.2345 then the following MATLAB command is issuedformat +Then b =
a. -
b. +33.2345
c. -33.2345
d. +
9. What is the number of default windows in MATLAB?
a. 2
b. 4
c. 3
d. 5
10. If a = 10/9 and you want to display a = 1.11, which command are you going to use?
a. format bank
b. format 2 digits
c. format 2
d. format short 2
11. If a = 10/9 and you want to display a = 10/9, which command are you going to use?
a. format real
b. format short
c. format fraction
d. format rat
12. How many decimals are displayed, if the following command in MATLAB is executed?format short
a. 12
b. 4
c. 8
d. 14
13. In Algebra, X = X + 1
True False (seems too easy?)
14. In MATLAB, X = X + 1
True False
15. If we assign variable "a" asa=9.1then we use format bank , What will MATLAB display the value of "a"?
a. a = 9.1000
b. a = 9.1
c. a = 9.10
d. a = 9.10000000000000
THANKS AGAIN!
Explanation / Answer
1.a 2.c 3.d d a a b d c c --- 11.c d c c a
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.