Find Optimal Kernel
%function k=FindOptKern(InSig,OutSig,MaxnLags)
%
% Given InSig, OutSig, and the MaxnLags, this will find the optimal causal
% kernal of length MaxnLags that when convolved with InSig gives the
% optimal approximation to OutSig in a least squares sense.
%
% Note that this code produces the optimal causal kernel. the basic
% technique does not have to produce a causal kernel, but this code does.
%
% Input
% InSig: An N x 1 vector of the input signal (i.e. Trial type in the
% trial history example)
% OutSig: An N x 1 vector of the output signal (i.e. RT in the trial
% history example)
% MaxnLags: A scalar for the maximum number of lags to calculate up to.
% Must be less than the length of the signal.
%
% k: A MaxnLags x 1 vector of the optimal kernel.
%
% For an explanation of this, See Corrado, Sugrue, Seung and Newsome (2004)
% pp. 591-592
% Also see: http://hebb.mit.edu/courses/9.29/2004/lectures/lecture03.pdf
%
% by MJN on 090318
Cita come
Matthew Nelson (2025). Find Optimal Kernel (https://it.mathworks.com/matlabcentral/fileexchange/23363-find-optimal-kernel), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
Tag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
