Prev: better way to do this?
Next: fmincon not updating
From: nooknickgigga korbenjawan on 2 Mar 2010 09:59 %in order to cut the whole columns which contain NaN, i done by : ret=price2ret(data,[],'periodic'); sumret=sum(ret); findnan=isnan(sumret); [m n]=size(findnan); for i=1:n; if findnan(1,i)==1; ret(:,i)=[]; else end end %it shows ??? Index of element to remove exceeds matrix dimensions. %Moreover, i've tried to cut the whole column of unmovement data out of my file by : p=input('Enter number of period for non moving price '); for a=1:m-p for b=1:n if sum(ret(a:a+p,b))==ret(a,b)*p; ret(:,b)=[]; end end end %but it still doesn't cut those column for me. Anyone please help to see which parts that i did wrong. thanks
|
Pages: 1 Prev: better way to do this? Next: fmincon not updating |