Predicting Mortality of ICU Patients: The PhysioNet/Computing in Cardiology Challenge 2012 1.0.0

File: <base>/sources/alistairewj_at_gmail.com/entry3/pnPreprocessReplaceData.m (951 bytes)
function [data] = pnPreprocessReplaceData(data,tmp,idx)
%PNPREPROCESSREPLACEDATA	Replace data in "data" with "tmp"
%	[data] = pnPreprocessReplaceData(data,tmp,idx) replaces values in data
%	with values in tmp using indices idx to map tmp to data. This function
%	is used with cellfun in PNPREPROCESSDATA.
%	
%
%	Inputs:
%		data    - Vector of data
%       tmp     - Vector of data after some form of preprocessing
%		idx     - Indices mapping tmp into data
%
%	Outputs:
%		data    - Vector of data with tmp imputed within
%		
%
%	Example
%		data(:,m) = cellfun(@pnReplaceData, data, tmp, idx, 'UniformOutput', false);
%	
%	See also PNPREPROCESSDATA

%	Copyright 2012 Alistair Johnson

%	$LastChangedBy: alistair $
%	$LastChangedDate: 2012-03-13 12:17:58 +0000 (Tue, 13 Mar 2012) $
%	$Revision: 225 $
%	Originally written on PCWIN64 by Alistair Johnson, 09-Mar-2012 17:47:37
%	Contact: alistairewj@gmail.com

data(idx)=tmp;