This repository contains code for digital signal processing (DSP) lab experiments. It is designed to generate and visualize basic discrete-time signals commonly used in DSP. Currently, the repository includes Experiment 1: Basic Signals, with each signal implemented in a separate Python script under the experiment1/ directory. Each script generates one signal and plots its waveform.
To run the experiments, you need Python 3 with NumPy and Matplotlib. Follow these steps:
-
Clone the repository:
git clone https://github.com/sreeramathrij/DSPLab.git cd DSPLab -
Create a virtual environment (optional but recommended):
python -m venv venv
-
Activate the virtual environment:
- On Linux/macOS:
source venv/bin/activate - On Windows:
venv\Scripts\activate
- On Linux/macOS:
-
Install required packages:
pip install numpy matplotlib
-
Run the experiment scripts:
python experiment1/sine.py
To plot sine, cosine, ramp, exponential, impulse, rectangular, bipolar pulse and triangular signals in continuous and discrete forms.
| File | Description |
|---|---|
sine.py |
Generates a sine wave |
cosine.py |
Generates a cosine wave |
triangular.py |
Generates a triangular waveform |
rectangular.py |
Generates a rectangular pulse |
bipolar.py |
Generates a bipolar waveform |
impulse.py |
Generates a unit impulse |
ramp.py |
Generates a ramp function |
exponential.py |
Generates an exponential signal |
Each script generates and plots a waveform. Add the output images in the respective directory and name them as follows:
To plot shifting, scaling, reversing and their combination of elementary signals.
| File | Description |
|---|---|
basicOperationsContinuos.py |
Generates all the time functions in continuous time |
basicOperationsDiscrete.py |
Generates all the time functions in discrete time |
impulseFromUnit.py |
Generates a dirac delta function from unit step function |
inverseShiftedExponential.py |
Generates the |
scaledRect.py |
Generates the |
scaledShiftedUnit.py |
Generates the |
Developed by sreeramathrij
.png)

















