(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

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter10: Pointers
Section10.1: Addresses And Pointers
Problem 5E
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr