-
Notifications
You must be signed in to change notification settings - Fork 0
/
Interpolate.m
43 lines (42 loc) · 1.54 KB
/
Interpolate.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function [interpolatedSignal] = Interpolate(effectiveReceptorLocations,...
effectiveSamples, imageLocations)
% Generate samples for a series of eye positions
%
% Syntax:
% [interpolatedSignal] = Interpolate(effectiveReceptorLocations,...
% effectiveSamples, imageLocations)
%
% Description:
% This function takes in the effective receptor locations, effective
% samples, and image locations in order to construct an interpolated
% signal based on the limited data available. It always returns an
% array of the signal length and values that on either side of the
% signal are left as NaN.
%
% Inputs:
% effectiveReceptorLocations - A 1D array containing the receptor
% locations with respect to the original
% signal
% effectiveSamples - A 1D array containing the receptor
% samples
% imageLocations - A 1D array containing the indices of
% the original signal
%
% Outputs:
% interpolatedSignal - A 1D vector containing an interpolated signal
% based on the receptor locations and sample values
% provided
%
% Optional key/value pairs:
% None.
%
% See also:
%
%
% History:
% 03/30/18 ak First Draft
%
%% Interpolate the signal and return
interpolatedSignal = interp1(effectiveReceptorLocations,...
effectiveSamples, imageLocations,'linear');
end