The concept correlation can be defined as similarities of two waveforms. It may determine if signal x1(t) waveform contain an amount c2x2(t) of that particular waveform x2(t) in the interval of (t1, t2). It is a measure of the degree to which two sequences are similar.Correlation is of two types cross correlation and autocorrelation.
Cross-correlation between two signals indicates what proportion one signal is said to the time-delayed version of another signal.
clc;
close all;
clear all;
% two input sequences
x=input(‘enter input sequence’);
h=input(‘enter the impulse sequence’);
subplot(2,2,1);
stem(x);
xlabel(‘n’);
ylabel(‘x(n)’);
title(‘input sequence’);
subplot(2,2,2);
stem(h);
xlabel(‘n’);
ylabel(‘h(n)’);
title(‘impulse sequence’);
% cross correlation between two sequences
y=xcorr(x,h);
subplot(2,2,3);
stem(y);
xlabel(‘n’);
ylabel(‘y(n)’);
title(‘ cross correlation between two sequences ‘);
The auto correlation function is a special form of cross correlation function.
clc;
close all;
clear all;
% two input sequences
x=input(‘enter input sequence’);
h=input(‘enter the impulse sequence’);
subplot(2,2,1);
stem(x);
xlabel(‘n’);
ylabel(‘x(n)’);
title(‘input sequence’);
subplot(2,2,2);
stem(h);
xlabel(‘n’);
ylabel(‘h(n)’);
title(‘impulse sequence’);
% auto correlation of input sequence
z=xcorr(x,x);
subplot(2,2,4);
stem(z);
xlabel(‘n’);
ylabel(‘z(n)’);
title(‘auto correlation of input sequence’);
clc;
close all;
clear all;
% cross correlation between two signals
% generating two input signals
t=0:0.2:10;
x1=3*exp(-2*t);
h1=exp(t);
figure;
subplot(2,2,1);
plot(t,x1);
xlabel(‘t’);
ylabel(‘x1(t)’);
title(‘input signal’);
subplot(2,2,2);
plot(t,h1);
xlabel(‘t’);
ylabel(‘h1(t)’);
title(‘impulse signal’);
% cross correlation
subplot(2,2,3);
z1=xcorr(x1,h1);
plot(z1);
xlabel(‘t’);
ylabel(‘z1(t)’);
title(‘cross correlation ‘);
% auto correlation
subplot(2,2,4);
z2=xcorr(x1,x1);
plot(z2);
xlabel(‘t’);
ylabel(‘z2(t)’);
title(‘auto correlation ‘);
In wordpress if you are developing new or custom wordpress theme or wordpress plugin then…
If you are experiencing indexing issues of your website then you are not alone and…
On your wordpress website if you want to generate qr code for pages and posts…
If you are trying to verify your WordPress website with google search console with html…
If you are on wordpress website and wondering how to keep search console html verification…
If you are getting too many redirects error on your WordPress website after changing url…