MATLAB EXAM WITH COMPLETE SOLUTIONS 100%
CORRECT
MATLAB was developed in the late 195's - ANSWER False - 1970
MATLAB is a high-level language that is exceptionally good at producing extremely
fast-executing programs - ANSWER False - supports scientific and engineering
computations
abstraction - ANSWER the evolution of computer language is driven by a process
___________.
interpreter - ANSWER will directly read a high-level statement written in the
programming language, execute the operation specified by that statement, then read
the next statement, and so on.
clc - ANSWER Clears the command window. Does not affect the workspace, meaning
variables are unchanged
clear - ANSWER clears all variables from the workspace, meaning all variable values are
lost.
diary - ANSWER Records into a file almost everything that appears in the command
window. The file's name is chosen by programmer, such as "my session.txt". "diary off"
ends the recording
exit - ANSWER exits the MATLAB session
who - ANSWER Prints all variables in the current workspace
,whos - ANSWER Prints all variables in the current workspace as well as some extra
information about their size, bytes, class, etc
ctrl-c - ANSWER Not a MATLAB command, but this key stroke combination stops an
infinite MATLAB calculation that a programmer has mistakenly entered. Subsequently,
the programmer may enter a new command.
assignment statement - ANSWER like age = 20;; when it is executed it takes the value
that is on the ='s right side and writes it into the variable that is on the ='s left side.
assignment operator - ANSWER The '=' is kn own as the ______.
identifier - ANSWER A variable's name is called an ______.
keywords - ANSWER break, else, global, return, case, else if, if, epode,catch, end,
otherwise, switch, classdef, for, parlor, try, continue, function, persistent, while
numeric variable - ANSWER stores a number
integer number - ANSWER positive or negative number that does not have a fractional
part
real number - ANSWER positive or negative number that may have a factional part
signed integer - ANSWER represents both positive and negative integer values
unsigned integer - ANSWER represents only non-negative integers.
signed 8-bit integer - ANSWER int8
, signed 32-bit integer - ANSWER int32
unsigned 16-bit integer - ANSWER uint16
Floating point number - ANSWER MATLAB stores a real number as a _______.
literal constant - ANSWER a number that appears in a statement
True - ANSWER The default MATLAB floating-point representation can represent
various numbers from -1.79e+308 to +1.79e+308.
pi - ANSWER The ratio of a circle's circumference to its diameter, about 3.1415.
i - ANSWER imaginary unit equal to sqrt(-1)
j - ANSWER Imaginary unit equal to sqrt(-1), same as i
Inf - ANSWER Infinity
NaN - ANSWER Not-a-Number
realmin - ANSWER smallest floating point number
realmax - ANSWER Largest floating point number
Overflow - ANSWER occurs when the result of a expression is larger than maximum that
can be stored within a variable.
CORRECT
MATLAB was developed in the late 195's - ANSWER False - 1970
MATLAB is a high-level language that is exceptionally good at producing extremely
fast-executing programs - ANSWER False - supports scientific and engineering
computations
abstraction - ANSWER the evolution of computer language is driven by a process
___________.
interpreter - ANSWER will directly read a high-level statement written in the
programming language, execute the operation specified by that statement, then read
the next statement, and so on.
clc - ANSWER Clears the command window. Does not affect the workspace, meaning
variables are unchanged
clear - ANSWER clears all variables from the workspace, meaning all variable values are
lost.
diary - ANSWER Records into a file almost everything that appears in the command
window. The file's name is chosen by programmer, such as "my session.txt". "diary off"
ends the recording
exit - ANSWER exits the MATLAB session
who - ANSWER Prints all variables in the current workspace
,whos - ANSWER Prints all variables in the current workspace as well as some extra
information about their size, bytes, class, etc
ctrl-c - ANSWER Not a MATLAB command, but this key stroke combination stops an
infinite MATLAB calculation that a programmer has mistakenly entered. Subsequently,
the programmer may enter a new command.
assignment statement - ANSWER like age = 20;; when it is executed it takes the value
that is on the ='s right side and writes it into the variable that is on the ='s left side.
assignment operator - ANSWER The '=' is kn own as the ______.
identifier - ANSWER A variable's name is called an ______.
keywords - ANSWER break, else, global, return, case, else if, if, epode,catch, end,
otherwise, switch, classdef, for, parlor, try, continue, function, persistent, while
numeric variable - ANSWER stores a number
integer number - ANSWER positive or negative number that does not have a fractional
part
real number - ANSWER positive or negative number that may have a factional part
signed integer - ANSWER represents both positive and negative integer values
unsigned integer - ANSWER represents only non-negative integers.
signed 8-bit integer - ANSWER int8
, signed 32-bit integer - ANSWER int32
unsigned 16-bit integer - ANSWER uint16
Floating point number - ANSWER MATLAB stores a real number as a _______.
literal constant - ANSWER a number that appears in a statement
True - ANSWER The default MATLAB floating-point representation can represent
various numbers from -1.79e+308 to +1.79e+308.
pi - ANSWER The ratio of a circle's circumference to its diameter, about 3.1415.
i - ANSWER imaginary unit equal to sqrt(-1)
j - ANSWER Imaginary unit equal to sqrt(-1), same as i
Inf - ANSWER Infinity
NaN - ANSWER Not-a-Number
realmin - ANSWER smallest floating point number
realmax - ANSWER Largest floating point number
Overflow - ANSWER occurs when the result of a expression is larger than maximum that
can be stored within a variable.