From: Neha on
Hi,

There is one problem regading reading of the data. Actually I am imputing the missing values using pchip but the problem in computation is that there are around 200 different categories in the excel sheet for which I need to calculate the values independently. in total there are around 16000 rows. Now I want to compute the missing value for 1-100, then 100-200 etc. I am using the following code

for i=1:100
y(i)=data(i,6);
end

x=1:100
B=isnan(y);
for i=1:100

if (B(i))
data (i,6) = ceil((pchip(x,y,x(i)))
end
end

Now what I want is that I used pchip to compute the missing values for first 100 observations then 100-200. For this I changed in the above code i= 100-200 (I am not sure if this is right to do).Similarly I will change for different rows.

Please suggest how can I do that, since it will be really cumbersome to make sepearte excel sheets for each category and then import them seperately.

Regards
Neha