Week 5 ENCMP 100 Flashcards
What is a vector
A vector is a special case of a matrix in which one of the dimensions is 1
What does the ‘char’ function do?
the function char converts an integer to the character equivalent
What does size() do?
size returns the # of rows and columns for a vector or matrix
Rows x Columns
What is the default data type in MATLAB?
The default data type is double
What does ‘subplot’ do?
The subplot function creates a matrix (or vector) in a
Figure Window so that multiple plots can be viewed at
once
What data types are supported in MATLAB
Real numbers, Integers, Characters and Strings, Logical & Complex Numbers
Abs means what?
Absolute value
Function ‘complex’ creates what?
A complex array
Conj creates what
Complex conjungate
What does ‘i’ do?
It is a imaginary unit
What does ‘imag’ do?
It is the imaginary part of a complex number
What does the colon operator do?
Colon operator: iterates through values in the form first:step:last
e.g. 5:3:14 returns vector [5 8 11 14]
What does .* do?
It is an array multiplication operator
How do you do array division?
array division: A ./ B, A .\ B
How do you do array exponential
array exponentiation A .^ 2