Jump to content
Wikipedia The Free Encyclopedia

File:Correlation function.svg

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Original file (SVG file, nominally 765 ×ばつ 765 pixels, file size: 69 KB)
This is a file from the Wikimedia Commons. Information from its description page there is shown below.
Commons is a freely licensed media file repository. You can help.

Summary

DescriptionCorrelation function.svg
English: The blue curve is the cross-correlation of a square wave and a cosine template, as the phase lag of the template varies over one cycle. The amplitude and phase at the maximum value are the polar coordinates of one harmonic in the Fourier series expansion of the square wave. The corresponding rectangular coordinates can be determined by evaluating the correlation at just two samples separated by 90°.
Date
Source Own work
Author Bob K
Permission
(Reusing this file)
I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse

SVG development
InfoField
The source code of this SVG is invalid due to 5 errors.
This W3C-invalid vector image was created with LibreOffice.
Gnu Octave source
InfoField
click to expand

This graphic was created with the help of the following Octave script:

graphics_toolkitgnuplot
pkgloadsignal
#{
Thegnuplotgraphicstoolkitisnotactivelymaintainedandhasanumber
oflimitationsthatareunlikelytobefixed.Communicationwithgnuplot
usesaone-directionalpipeandlimitedinformationispassedbacktothe
Octaveinterpretersomostchangesmadeinteractivelyintheplotwindow
willnotbereflectedinthegraphicspropertiesmanagedbyOctave.For
example,iftheplotwindowisclosedwithamouseclick,Octavewillnot
benotifiedandwillnotupdateitsinternallistofopenfigurewindows.
Theqttoolkitisrecommendedinstead.
#}
set(0,"DefaultAxesTitleFontWeight","bold")
set(0,"DefaultAxesFontWeight","bold")
set(0,"DefaultAxesFontSize",14)

P=2000;% signal duration
x=0:P-1;% sampling times

% Any function will do for the signal. It needn't be periodic, but a square wave is convenient.
period=233;% square wave period
s=square((x-period*.67)*2*pi/period);
n=4;% a harmonic (any harmonic will do)

num_angles=1000;% eval the correlation function at 1000 phases
correl=[];
phi=(0:1:num_angles-1)/num_angles;
form=phi
% The right-hand side is equivalent to sum(s.*cos(2*pi*(n/P*x - m))
correl(end+1)=real(sum(s.*exp(-i*2*pi*(n/P*x-m))));
endfor

figure("position",[11700700])
plot(phi*360,correl,"color","b","linewidth",3)
xlim([0360]);
set(gca,'xtick',[01234]*90);

[maxval,idx]=max(correl);
cossin=sum(s.*exp(i*2*pi*n*x/P))
% The next two things are equal
mod(atan2(imag(cossin),real(cossin))*360/(2*pi),360)
(idx-1)*360/num_angles
% The next two things are equal
maxval
abs(cossin)

holdon
stem((idx-1)*360/num_angles,correl(idx),"filled","linewidth",4,"color",[101],"markerfacecolor",[101])
stem(0,correl(0*num_angles/360+1),"filled","linewidth",4,"color",[101],"markerfacecolor",[101])
stem(90,correl(90*num_angles/360+1),"filled","linewidth",4,"color",[101],"markerfacecolor",[101])

title("Cross-correlation function","fontsize",14);
xlabel("phase lag (degrees)","fontsize",14)
ylabel("correlation amplitude","fontsize",14)

Captions

Example of using two points of a correlation function to determine the location and height of its maximum

Items portrayed in this file

depicts

copyright license<\/a>"}},"text\/plain":{"en":{"":"copyright license"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":6938433,\"id\":\"Q6938433\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P275":"Creative Commons CC0 License<\/a>"}},"text\/plain":{"en":{"P275":"Creative Commons CC0 License"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P275 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
inception<\/a>"}},"text\/plain":{"en":{"":"inception"}}},"{\"value\":{\"time\":\"+2022年04月11日T00:00:00Z\",\"timezone\":0,\"before\":0,\"after\":0,\"precision\":11,\"calendarmodel\":\"http:\\\/\\\/www.wikidata.org\\\/entity\\\/Q1985727\"},\"type\":\"time\"}":{"text\/html":{"en":{"P571":"11 April 2022"}},"text\/plain":{"en":{"P571":"11 April 2022"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P571 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

11 April 2022

media type<\/a>"}},"text\/plain":{"en":{"":"media type"}}},"{\"value\":\"image\\\/svg+xml\",\"type\":\"string\"}":{"text\/html":{"en":{"P1163":"image\/svg+xml"}},"text\/plain":{"en":{"P1163":"image\/svg+xml"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P1163 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

image/svg+xml

source of file<\/a>"}},"text\/plain":{"en":{"":"source of file"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":66458942,\"id\":\"Q66458942\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P7482":"original creation by uploader<\/a>"}},"text\/plain":{"en":{"P7482":"original creation by uploader"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P7482 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">
checksum<\/a>"}},"text\/plain":{"en":{"":"checksum"}}},"{\"value\":\"09d1bd458779569d05dacbd6a5732edae1476426\",\"type\":\"string\"}":{"text\/html":{"en":{"P4092":"09d1bd458779569d05dacbd6a5732edae1476426"}},"text\/plain":{"en":{"P4092":"09d1bd458779569d05dacbd6a5732edae1476426"}}},"{\"value\":{\"entity-type\":\"property\",\"numeric-id\":459,\"id\":\"P459\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"":"determination method or standard<\/a>"}},"text\/plain":{"en":{"":"determination method or standard"}}},"{\"value\":{\"entity-type\":\"item\",\"numeric-id\":13414952,\"id\":\"Q13414952\"},\"type\":\"wikibase-entityid\"}":{"text\/html":{"en":{"P459":"SHA-1<\/a>"}},"text\/plain":{"en":{"P459":"SHA-1"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P4092 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

09d1bd458779569d05dacbd6a5732edae1476426

data size<\/a>"}},"text\/plain":{"en":{"":"data size"}}},"{\"value\":{\"amount\":\"+70305\",\"unit\":\"http:\\\/\\\/www.wikidata.org\\\/entity\\\/Q8799\"},\"type\":\"quantity\"}":{"text\/html":{"en":{"P3575":"70,305 byte<\/span>"}},"text\/plain":{"en":{"P3575":"70,305 byte"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P3575 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

70,305 byte

height<\/a>"}},"text\/plain":{"en":{"":"height"}}},"{\"value\":{\"amount\":\"+765\",\"unit\":\"http:\\\/\\\/www.wikidata.org\\\/entity\\\/Q355198\"},\"type\":\"quantity\"}":{"text\/html":{"en":{"P2048":"765 pixel<\/span>"}},"text\/plain":{"en":{"P2048":"765 pixel"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P2048 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

765 pixel

width<\/a>"}},"text\/plain":{"en":{"":"width"}}},"{\"value\":{\"amount\":\"+765\",\"unit\":\"http:\\\/\\\/www.wikidata.org\\\/entity\\\/Q355198\"},\"type\":\"quantity\"}":{"text\/html":{"en":{"P2049":"765 pixel<\/span>"}},"text\/plain":{"en":{"P2049":"765 pixel"}}}}" class="wbmi-entityview-statementsGroup wbmi-entityview-statementsGroup-P2049 oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed">

765 pixel

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current03:19, 12 April 2022 Thumbnail for version as of 03:19, 12 April 2022 765 ×ばつ 765 (69 KB)Bob K Uploaded own work with UploadWizard

The following 2 pages use this file:

Metadata

This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.

If the file has been modified from its original state, some details may not fully reflect the modified file.

Width215.9mm
Height215.9mm

AltStyle によって変換されたページ (->オリジナル) /