Professional Documents
Culture Documents
INDEX
Serial Name of the Date of Date of
Number experiment experiment submission
3 Plotting 8/08/19
Sinusoidal
waves
Experiment 1
AIM: Introduction to application of octave for plotting signals.
Transforming voice signal i.e scaling, shifting, inverting, amplifying
using Octave.
SOFTWARE USED:Octave
INTRODUCTION:
A signal is a description of how one parameter varies with another
parameter. For instance, voltage changing over time in an
electronic circuit, or brightness varying with distance in an image.
A system is any process that produces an output signal in
response to an input signal.
DESCRIPTION:
● We learnt how to create an array of nos from 1 to 10.
● Multiplication = x*(complement of y).
● Plotting graphs using plot() command.
● Giving comments to any statement.
● Then we learnt to use CLC, CLOSE ALL, CLEAR command
before starting the program of octave.
● Operations on our voice signal:
1. Listen to our own voice in octave
2. Flipping our voice
3. Amplifying our voice
4.Shifting our voice
1. Listen to our own voice using octave
Firstly we uploaded the file in the wav format i.e using the
extension “.wav”.
Then using the audioread and sound command, we listened to
the voice signal.
Command:
2. Flipping of voice
Command:
[y,fs]=audioread('C:\Users\AYUSHI\Downloads\yes4.wav');
c1=y(:,1);
c2=flip(c1);
flip(c2);
plot(c2);
3.Voice amplification:
4. Shifting of the signal
The signal was shifted by addition or subtraction using the ‘+’ or
the ‘-’ operator.
Commands:
[y,fs]=audioread('D:\Parija\maybe-next-time.wav');
c1=y(:,1);
plot(c1);
c2=2+c1;
hold on;
plot(c2);
RESULT :
Through this experiment,we learned the shifting,
flipping,amplification of the sound.
Experiment 2
SOFTWARE USED
:
Octave-GUI
PROCEDURE:
RESULT: W
ith the help of octave, the two audio files in the wav
format were merged successfully.
Experiment 3
AIM lotting sinusoidal waves and using subplot to plot them on
: P
a single page
SOFTWARE USED :
Octave-GUI
Experiment 4
AIM bserving the phenomenon of aliasing effect of the signals.
: O
SOFTWARE USED
:
Octave-GUI
SOFTWARE USED
:
Octave-GUI
y(t)=x(t)*h(t)
Where y (t) = output of LTI
x (t) = input of LTI
h (t) = impulse response of LTI
There are two types of convolutions:
● 1. Continuous convolution
● 2. Discrete convolution
Continuous Convolution:
D
iscrete Convolution:
CODE:
clc;
clear all;
close;
sum=0;
y=[0,0,0,0,0,0,0,0];
x=[1,2,3,4,0,0,0,0];
h=[1,2,3,4,0,0,0,0];
for n=1:8
for k=1:n
if (n-k)>0
y(n)=y(n)+x(k)*h(n-k);
endif
endfor
endfor
y(1)=[];
stem(y);
Graph:
TASK 2: - To record impulse response in an empty room and record the
output signal for any input signal by convolution.
CODE:
clc;clear;close all;
c1 = y(1:60000,1);
c2 = x(:,1);
z=conv(y,0.01*x(:,1));
sound(y,fs1);
sound(x,fs2);
sound(z,fs1);
plot(z);
OBSERVATION AND RESULT: With the help of this experiment, we get to analyze
how our voice appears to sound if we had recorded that in the lab itself.
Experiment 6
ourier series transformation, Finding the values of Fourier
AIM: F
components for a given range of k of a given signal.
Plot graphs for:
1. Fourier component’s magnitude v/s abs(a)
2. Fourier component’s magnitude v/s angle(a)
3. Original signal v/s time(t)
SOFTWARE USED: Octave-GUI
THEORY: T he discrete-time Fourier transform of a discrete set of
real or complex numbers x[n], for all integers n, is a Fourier series,
which produces a periodic function of a frequency variable. When
the frequency variable, ω, has normalized units of sample, the
periodicity is 2π, and the Fourier series is shown in this given
experiment.
Command Window:
Graphs:
OBSERVATIONS AND RESULT: Here we plot the different graphs
for analyzing Fourier series transformation for discrete-time
signals There is plotting the square wave using the inbuilt
function, so I did the experiment using the linspace command.
Experiment 7
econstruct the original signal by summing up the different
AIM: R
values of Fourier coefficients.
SOFTWARE USED: Octave-GUI
Command Window and Graph:
RESULT: Reconstruction of the original signal is done by using
different values of k.