From: Faraz Afzal on 28 Jun 2010 09:12 "Neha " <smile_neha16(a)yahoo.co.in> wrote in message <i0a63r$c5g$1(a)fred.mathworks.com>... > 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 Dear Neha, Tell me what You mean by categories.. If you are saying categories are the columns of an excel sheet your problem is failry simple.. As I understood you have an excel sheet of size (16000 x 200) rows = 16000 columns = 200 and you want to use pchip to interpolate the missing data within all 200 columns and 16000 rows.. If this is what u want tell me and i will show u how u will get thta.. Lastly, if u want the interpolation to be realistic why u r using CEIL ?? You problem bit more explained would let me help you. Perhaps an example will surve the prupose. Regards, Faraz
|
Pages: 1 Prev: Invalid Mex File:specific module cannot be found Next: Generation of pdf from Matlab |