Thursday, May 16, 2024

Aperiodic signals

Must read

Aperiodic signals:

If the signal does not repeat at regular intervals of time is called aperiodic signal.

Square wave:

Let us consider an example for square wave in matlab.

clc;

clear all;

close all;

t=0:0.002:0.1;

y=square(2*pi*50*t);

figure;

subplot(1,2,1);

plot(t,y);

axis([0 0.1 -2 2]);

xlabel(‘time’);

ylabel(‘amplitude’);

title(‘square wave signal’);

%generation of square wave sequence

subplot(1,2,2);

stem(t,y);

axis([0 0.1 -2 2]);

xlabel(‘n’);

ylabel(‘amplitude’);

title(‘square wave sequence’);

Sawtooth wave:

Let us consider an example of sawtooth wave in matlab.

clc;

clear all;

close all;

%generation of sawtooth signal

t=0:0.002:0.1;

y=sawtooth(2*pi*50*t);

subplot(1,2,1);

plot(t,y);

axis([0 0.1 -2 2]);

xlabel(‘time’);

ylabel(‘amplitude’);

title(‘sawtooth wave signal’);

%generation of sawtooth sequence

subplot(1,2,2);

stem(t,y);

axis([0 0.1 -2 2]);

xlabel(‘n’);

ylabel(‘amplitude’);

title(‘sawtooth wave sequence’);

Triangular wave:

Let us consider an example of triangular wave in matlab.

clc;

clear all;

close all;

%generation of triangular wave signal

t=0:0.002:0.1;

y=sawtooth(2*pi*50*t,.5);

figure;

subplot(2,2,1);

plot(t,y);

axis([0 0.1 -2 2]);

xlabel(‘time’);

ylabel(‘amplitude’);

title(‘ triangular wave signal’);

%generation of triangular wave sequence

subplot(2,2,2);

stem(t,y);

axis([0 0.1 -2 2]);

xlabel(‘n’);

ylabel(‘amplitude’);

title(‘triangular wave sequence’);

Previous article
Next article
- Advertisement -

More articles

- Advertisement -

Latest article