% finance2.csv与finance.csv相比做如下处理：把NA替换成NaN，因为MATLAB中NaN才是缺失数据。
format long
data=csvread('G:\finance2.csv',1,0);
data2=data;
[m,n]=size(data);
pp=0;
for i=1:n
        temp=data(:,i);
        temp2=isnan(temp);
        ind1=find(temp2==1);
        ind0=find(temp2==0);

        ind2=ind1<max(ind0);
        ind3=ind1(ind2);
        tempy=interp1(ind0,temp(ind0),ind3,'pchip');
        data2(ind3,i)=tempy;

end

