(1) what is the output of the this code A = [2 1; 0 2] ;B=3 ;C= A + B (in editor window)? (A) a) 52 45 C) 54 D) 4 5 B) 54 43 35 53 ; (2) What is the output of this code a=2:7 c=a.^3 (in editor window)? (A) [8 343] (B) [2 3 4 5 6 7] (C) [343 216 125 64 27 ] (D) .[8 27 64 125 216 343] (3) What happens if we don't assign a variable to an expression which evaluates a numerical value? (A) MATLAB shows error (B) Nothing happens (C) The evaluated values are assigned to a variable ans automatically (D) Depends on the numerical value

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 17RQ
icon
Related questions
Topic Video
Question
I need the answer at 20 minute
Select the correct answer of the followings:
(1) what is the output of the this code A = [2 1; 0 2];B=3 ;C = A + B (in editor window)?
(A) a) 52
B) 5 4
43
C) 5 4
35
D) 4 5
53
45
(2) What is the output of this code a=2:7
;
ca.^3 (in editor window)?
(A) [8 343] (B) [2 3 4 5 6 7] (C) [343 216 125 64 27 ] (D) .[8 27 64 125 216 343]
(3) What happens if we don't assign a variable to an expression which evaluates a numerical value?
(A) MATLAB shows error (B) Nothing happens (C) The evaluated values are assigned to a variable ans
automatically (D) Depends on the numerical value
(4) What is the output of the following code? A=50; if(A>49) clear A; end
(A) A never gets stored in MATLAB (B) A is first stored and then removed from workspace (C) Error
(D) A is retained in the workspace
(5) What does the Workspace show?
(A Attributes of variables, functions from command window (B) Attributes of variables, script files from
command window (C) Attributes of variables, script files, functions from command window (D) Attributes of
variables from command window.
MATLAB
(6) What is the output for the following code? if(a>b) p=9;
(A) No output (B) Never will there be an output (C) a, b, p are not initialized (D) p=9
(7) Choose the correct option.
(A) any() shows all the elements in a matrix while all() shows every element of a vector. (B) any() is 'true' if
elements in a vector is zero (C) all() is 'true' if every element in a vector is non zero (D) all() is 'true' if every
element in a vector is 0
(8) the difference between these expressions (9*1-8) & (9-1*8) is?
(A) Computational difference (B) Final results are different (C) Cannot be determined (D) No difference.
(9) Vectors depend upon brackets while scalars don't.
(A) True (B) False
(10) The format for 5-digit representation along with exponent is
(A) short e (B) short g (C) short exp (D) 4 digits along with exponent value can be represented
Transcribed Image Text:Select the correct answer of the followings: (1) what is the output of the this code A = [2 1; 0 2];B=3 ;C = A + B (in editor window)? (A) a) 52 B) 5 4 43 C) 5 4 35 D) 4 5 53 45 (2) What is the output of this code a=2:7 ; ca.^3 (in editor window)? (A) [8 343] (B) [2 3 4 5 6 7] (C) [343 216 125 64 27 ] (D) .[8 27 64 125 216 343] (3) What happens if we don't assign a variable to an expression which evaluates a numerical value? (A) MATLAB shows error (B) Nothing happens (C) The evaluated values are assigned to a variable ans automatically (D) Depends on the numerical value (4) What is the output of the following code? A=50; if(A>49) clear A; end (A) A never gets stored in MATLAB (B) A is first stored and then removed from workspace (C) Error (D) A is retained in the workspace (5) What does the Workspace show? (A Attributes of variables, functions from command window (B) Attributes of variables, script files from command window (C) Attributes of variables, script files, functions from command window (D) Attributes of variables from command window. MATLAB (6) What is the output for the following code? if(a>b) p=9; (A) No output (B) Never will there be an output (C) a, b, p are not initialized (D) p=9 (7) Choose the correct option. (A) any() shows all the elements in a matrix while all() shows every element of a vector. (B) any() is 'true' if elements in a vector is zero (C) all() is 'true' if every element in a vector is non zero (D) all() is 'true' if every element in a vector is 0 (8) the difference between these expressions (9*1-8) & (9-1*8) is? (A) Computational difference (B) Final results are different (C) Cannot be determined (D) No difference. (9) Vectors depend upon brackets while scalars don't. (A) True (B) False (10) The format for 5-digit representation along with exponent is (A) short e (B) short g (C) short exp (D) 4 digits along with exponent value can be represented
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,