(1) what is the output of the this code A = [2 1; 0 2] ;B=3 ;C = A + B (in editor window)? (A) a) 5 2 45 B) 5 4 4 3 C) 5 4 35 D) 4 5 5 3 c=a.^3 (in editor window)? (2) What is the output of this code a=2:7 (A) [8 343] (B) [2 3 4 56 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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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)?
C) 5 4
(A) a) 5 2
45
B) 5 4
D) 4 5
43
35
5 3
(2) What is the output of this code a=2:7
(A) [8 343] (B) [2 3 4 56 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
c=a.^3 (in editor window)?
(6) What is the output for the following code? if(a>b) p=9;
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)? C) 5 4 (A) a) 5 2 45 B) 5 4 D) 4 5 43 35 5 3 (2) What is the output of this code a=2:7 (A) [8 343] (B) [2 3 4 56 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 c=a.^3 (in editor window)? (6) What is the output for the following code? if(a>b) p=9;
Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education