Background Information - Part 1

For background information, pls see Signal Processing with Julia Language- Part I

In part 1 we discussed how to represent a signal, and constructor functions using my signal package in Julia.

My signal processing package can be found at MySignalProcessing.jl

using MySignalProcessing
using Plots

Basic Signal Processing Functions

In part 2 we will discuss some basic signal processing functions and how to create them for further manipulation.

Unit impulse signal

This sequence is defined as:

$$\delta(n) = \begin{cases} 1 & \text{ if } n = 0 \\ 0 & \text{otherwise} \end{cases}$$

s = impseq(-10, 10); #create imp. sequence, -10 to 10 

fig1 = plot(s.n, s.A, line =:stem, marker=:o)

Unit Step Sequence

This sequence is defined as:

$$u(n) = \begin{cases} 1 & \text{ if } n \geq 0 \\ 0 & \text{otherwise} \end{cases}$$

s = stepseq(-5, 10);
fig2 = plot(s.n, s.A, line =:stem, marker=:o)

sigrand Function - Generates a random signal

s1 = sigrand(-15,10); #create random signal, -15 to 10
plot(s1.n, s1.A, line=:stem, color=:red, marker=:o, xlims=(-15,10))

Real-Valued Exponential Signal

This function is defined as:

$$r(a, n) = a^n$$

s = realexp(1.1, -50, 50);
plot(s.n, s.A, line =:stem, marker=:o)
s = realexp(0.9, -50, 50);
plot(s.n, s.A, line =:stem, marker=:o)