Hi,
I'm processing some data collected of charges and discharges curves of a battery. To do so, I'm fitting the data to a polynomial using polifit. what I'm doing is the following:
t=time(line,colomn); V=volt(line,colomn); sz=size(t,1); l=150; n=3; tab=[]; %charge
for k1=(1+l/2):sz-l/2 x=t((k1-l/2):(k1+l/2),1); y=V((k1-l/2):(k1+l/2),1); poly=polyfit(x,y,n); yf=polyval(pply,t(k1,1)); tab=[tab;t(k1,1) yf]; %But it takes a lot of time doing it. It exist any other way to do the same thing in less time?
%I think that part of the problem come from doing vertcat of each value.
thank you
Best Answer