Signal Processing with Julia Language- Part 2
Basic Signal Functions
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
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)
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)
s1 = sigrand(-15,10); #create random signal, -15 to 10
plot(s1.n, s1.A, line=:stem, color=:red, marker=:o, xlims=(-15,10))
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)