#! e:\vee/vee -r (saveFormat "1.2") (date "Fri 03/Jan/1997") (SaveCF "no") (filterNAN 0) (component 0 "ROOTCONTEXT" (name "Untitled") (interface ) (implementation (locked no) (trigMode deg) (nextID 32) (component 0 "LABEL" (name "Convolution & Correlation") (interface (sequence in) (sequence out) ) (implementation (component labelValue "Convolution & Correlation") ) (views (icon (extent 178 0) ) (detail (origin 270 49) (extent 340 42) (just c) ) (title off) (active detail) (font "Arial" 26 bold) ) ) (component 1 "CONSTANT" (name "Real") (subType "Real") (interface (sequence in) (sequence out) (output 1 (name "Real") (lock name constraints) ) ) (implementation (component value Real (numDims 1) (size 3) (data [ 1 -1 2 ] ) ) (component initValue Real (data 0 ) ) ) (views (icon ) (detail (origin 9 179) (extent 182 62) (showFormat real) ) (active detail) ) ) (component 2 "CONSTANT" (name "Real") (subType "Real") (interface (sequence in) (sequence out) (output 1 (name "Real") (lock name constraints) ) ) (implementation (component value Real (numDims 1) (size 4) (data [ 1 2 3 -1 ] ) ) (component initValue Real (data 0 ) ) ) (views (icon ) (detail (origin 9 51) (extent 182 78) (showFormat real) ) (active detail) ) ) (component 3 "FORMULA" (name "convolve(a,b)") (subType "convolve") (interface (sequence in) (sequence out) (input 1 (name "A") (optional yes) ) (input 2 (name "B") (optional yes) ) (output 1 (name "Result") (lock name constraints) ) ) (implementation (component expr 1 "convolve(a, b)") ) (views (icon ) (detail (origin 278 175) (extent 124 50) ) (terminals on) (active detail) ) ) (component 4 "TEXTDISPLAY" (interface (sequence in) (sequence out) (input 1 (name "Data") ) ) (implementation (component clearAtPrerun 1) (component clearAtActivate 1) ) (views (icon ) (detail (origin 487 137) (extent 127 126) (formatter (realFormat fixed) (realSigDigits 4) (realRadixSpec 2) (integerBase decimal) ) ) (active detail) ) ) (component 7 "TEXTDISPLAY" (interface (sequence in) (sequence out) (input 1 (name "Data") ) ) (implementation (component clearAtPrerun 1) (component clearAtActivate 1) ) (views (icon ) (detail (origin 486 312) (extent 129 136) (formatter (realFormat fixed) (realSigDigits 4) (realRadixSpec 2) (integerBase decimal) ) ) (active detail) ) ) (component 9 "CONSTANT" (name "Real") (subType "Real") (interface (sequence in) (sequence out) (output 1 (name "Real") (lock name constraints) ) ) (implementation (component value Real (numDims 1) (size 3) (data [ 1 -1 2 ] ) ) (component initValue Real (data 0 ) ) ) (views (icon ) (detail (origin 9 409) (extent 182 62) (showFormat real) ) (active detail) ) ) (component 10 "CONSTANT" (name "Real") (subType "Real") (interface (sequence in) (sequence out) (output 1 (name "Real") (lock name constraints) ) ) (implementation (component value Real (numDims 1) (size 4) (data [ 1 2 3 -1 ] ) ) (component initValue Real (data 0 ) ) ) (views (icon ) (detail (origin 9 291) (extent 182 78) (showFormat real) ) (active detail) ) ) (component 11 "FORMULA" (name "xcorrelate(a,b)") (subType "xcorrelate") (interface (sequence in) (sequence out) (input 1 (name "A") (optional yes) ) (input 2 (name "B") (optional yes) ) (output 1 (name "Result") (lock name constraints) ) ) (implementation (component expr 1 "xcorrelate(a, b)") ) (views (icon ) (detail (origin 275 355) (extent 130 50) ) (terminals on) (active detail) ) ) (component 27 "NOTE" (interface ) (implementation (component text 22 5 Convolution & Correlation Example / v1.0 / 03 jan 97 / gvg * This little example program demonstrates the operation of the convolution and correlation functions. Both these functions are very similar in that a first data set is multiplied by a second data set and summed in a particular fashion; the difference is that in a convolution, the order of the data in the second set is reversed before performing the operation, while in a correlation the order of the second set is retained. Note that these operations are *not* commutative ... if you exchange one input function for the other on the input pins, you get different results. (In fact, the second set cannot have a larger number of values than the first.) The output of the functions is an array with a number of elements equal to the sum of the lengths of each of the input arrays, minus 1. Convolutions are used to implement digital-filtering operations; they correspond to a simple so-called "finite impulse response" filter, where the second function gives the filter coefficients. Correlation, however, is used to determine the match between an input and output function. [<>] ) ) (views (icon (origin 306 254) (extent 68 52) (iconImage "notepad.icn") ) (detail (origin 34 104) (extent 712 373) (editing enabled) ) (active icon) ) ) (component 28 "TEXTDISPLAY" (interface (sequence in) (sequence out) (input 1 (name "Data") ) ) (implementation (component clearAtPrerun 1) (component clearAtActivate 1) ) (views (icon ) (detail (origin 486 512) (extent 129 136) (formatter (realFormat fixed) (realSigDigits 4) (realRadixSpec 2) (integerBase decimal) ) ) (active detail) ) ) (component 29 "FORMULA" (name "xcorrelate(a,b)") (subType "xcorrelate") (interface (sequence in) (sequence out) (input 1 (name "A") (optional yes) ) (input 2 (name "B") (optional yes) ) (output 1 (name "Result") (lock name constraints) ) ) (implementation (component expr 1 "xcorrelate(a, b)") ) (views (icon ) (detail (origin 275 555) (extent 130 50) ) (terminals on) (active detail) ) ) (component 30 "CONSTANT" (name "Real") (subType "Real") (interface (sequence in) (sequence out) (output 1 (name "Real") (lock name constraints) ) ) (implementation (component value Real (numDims 1) (size 3) (data [ 2 -1 1 ] ) ) (component initValue Real (data 0 ) ) ) (views (icon ) (detail (origin 9 629) (extent 182 62) (showFormat real) ) (active detail) ) ) (component 31 "CONSTANT" (name "Real") (subType "Real") (interface (sequence in) (sequence out) (output 1 (name "Real") (lock name constraints) ) ) (implementation (component value Real (numDims 1) (size 4) (data [ 1 2 3 -1 ] ) ) (component initValue Real (data 0 ) ) ) (views (icon ) (detail (origin 9 511) (extent 182 78) (showFormat real) ) (active detail) ) ) (configuration (connect D2:1 D3:1) (connect D1:1 D3:2) (connect D3:1 D4:1) (connect D8:1 D5:1) (connect D7:1 D8:1) (connect D6:1 D8:2) (connect D11:1 D10:1) (connect D13:1 D11:1) (connect D12:1 D11:2) ) ) (views (detail (origin 0 24) (extent 800 538) (configuration (connect D2:1 D3:1 (Point 193 90) (Point 210 90) (Point 210 190) (Point 245 190) ) (connect D1:1 D3:2 (Point 193 210) (Point 245 210) ) (connect D3:1 D4:1 (Point 454 200) (Point 484 200) ) (connect D8:1 D5:1 (Point 457 380) (Point 483 380) ) (connect D7:1 D8:1 (Point 193 330) (Point 210 330) (Point 210 370) (Point 242 370) ) (connect D6:1 D8:2 (Point 193 440) (Point 210 440) (Point 210 390) (Point 242 390) ) (connect D11:1 D10:1 (Point 457 580) (Point 483 580) ) (connect D13:1 D11:1 (Point 193 550) (Point 210 550) (Point 210 570) (Point 242 570) ) (connect D12:1 D11:2 (Point 193 660) (Point 210 660) (Point 210 590) (Point 242 590) ) ) (stackingOrder 2 1 7 6 5 8 4 3 13 12 11 10 0 9) ) (active detail) (numberFormats (realFormat standard) (realSigDigits 4) (realRadixSpec 4) (integerBase decimal) ) ) )