(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
(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
Chapter5: Looping
Section: Chapter Questions
Problem 17RQ
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Ff3ab13c0-2c57-438b-8eb4-42914c7df649%2F15ee37dc-2645-4674-8882-253d7f0feff6%2F2ejj1bk_processed.jpeg&w=3840&q=75)
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

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps

Knowledge Booster
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.Recommended textbooks for you

Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage

C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning

Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage

C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning

EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT

C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr