Matlab
Quick Reference
Vector (One Dimmensional Array)
Creating a vector
Creating a vector with linspace(
)
Mathematical Operation
Applying Functions
Referencing the elements
Concatenating Vectors
Removing Elements from a Vector
Rearranging Elements
shift()
Getting the size of the vector
size()
length()
Converting a Vector into a Matrix (Converting one dimmensional array into multi dimensional array)
norm
Matrix (Two or Higher Dimmensional Array)
Creating a Matrix
Generic Form
Identity Matrix
- eye()
M x N Zero Matrix - zeros()
M x N One Matrix - ones()
Mathematical Operation
addition
subtraction
multiplication - element by element
multiplication - Inner Product
power - element by element
power - matrix
division
transpose
determinent
inverse
Indexing the elements (reference to elements)
matrixname(rowindex,colindex)
matrixname(:,colindex)
matrixname(rowindex,:)
Matrix specific operations
Eigenvalue and Eigenvector
Decomposition
LU Decomposition
Rearranging Elements
circshift()
resize()
Random Number Generation
Single Random Number between 0 and 1
Single Random Number between a and b
N Random Number between 0 and 1
N Random Number between a and b
Single Random Integer between 0 and N
Single Random Integer between a and b
N Random Number between 0 and N
N Random Number between a and b
N Random Number of Normal Distribution with mean = 0, standard deviation = 1
N Random Number of Normal Distribution with mean = m, standard deviation = 1
N Random Number of Normal Distribution with mean = m, standard deviation = s
N Binary Random Number with 0 and 1
N Binary Random Number with -1 and 1
Complex Random Number with Re = {-1,1}, Im = {-1,1}
Generating the same random sequence - Setting the seed number
2D Graph
Plot only one data set (y axis data only)
Plot a set of data ((x,y) sequence)
x,y Axis Range
Graph Title, Axis Label
Graph Format and Color
Graph with Filled Marker
MarkerFaceColor
MarkerSize
AspectRatio
LineWidth
Multiple Plots in a single graph area using plot
Multiple Plots in a single graph area using hold on
Multiple Plots in a single graph area using subplot
Placing Legend
TickMark/TickLabel
Turning On/Off
User Defined Tick
User Defined Ticklabel
Grid
Turning On/Off
3D Graph
plot3
linewidth, color setting
view
mesh
axis (axis range)
surface
contour
Labeling the level line
Forcing contour lines
Implicit Plot
scatter3
surface in spherical coordinate
patch : drawing a cube
patch : drawing multiple cubes
Applied Plots
Vector Plot - Vector Field
Vector Plot - Gradient Plot
Vector Plot - Surface Normal
Histogram - Un Normalized
Histogram - Normalized
stairs graph
Function/User Defined Function
Signal Processing
Quantization - quantiz
Zero Stuffing
Sample and Hold
Sample and Hold and Moving Avg
Sample and Hold and Low Pass Filter
interpolation - interp
interpolation - complex number
resample (upsample) - resample
resample (downsample) - resample
filter
fir1
fir2
freqz
Filter Design Tutorial
RRC (Root Raised Cosine) Filter
Communication
Basic Functions
randi()
bi2de()
qammod()
awgn()
qamdemod()
de2bi()
biterr()
Basic Implementation of Communication Sytem.
Creating Random BitStream
Coverting Bit Stream into Symbol Stream
Modulation-Mapping Symbols onto a Constellation
Adding Noise
Demodulation - Demapping a Constellation to a Symbol
Converting a Symbol to Bits
BER Calculation
AM Modulation/Demodulation
Encoding/Decoding
Coding(Encode/Decode)
Galois Field
gfconv
Examples of Channel Coding
Hamming
Cyclic
Linear
Convolutional Code
Representation of Convolutional Code
Examples of Representation for Convolutional Code
Trellis - struct
Trellis - poly2trellis
Channel Modeling - Matlab comm object
QPSKModulator
rayleighchan
ricianchan
Differential Equation
ODE45
1st Order
Pendulum
Pendulum
Single Spring-Mass
Undamped
Damped
Damped with External Force
Damped with External Force, Frequency Sweep
Vader Pol Oscillator
Vader Pol Oscillator with External Force
Duffin Oscillator
Lorenz Attractor
Chemical Reaction
Matrix Equation - 2 x 2
Lsim-State Space Model
Damped Spring
RLC Circuit
Step
1/s
1/(a*s+1)
1/(a*s^2 + b*s + 1)
For Loop
String Manipulation
CSV Manipulation
Read Binary File
Image Handling