Fitting function using three data series
조회 수: 1 (최근 30일)
이전 댓글 표시
I want to fit the three intermediate series data seriesI have so that I will have long time series data. Each of the data contain 26 values(total of 78) at different time and I want to extend (fit) these data upto hTime= 25000.
The three data I have, which contains 26 values are in equation form
i-2.327+0.6.*(1:25) %% starts at time , tni= 11707
ii-1.492+ 0.46.*(1:25) %% starts at time , tmi= 16400
iii-1.2+ 0.3.*(1:25) %% starts at time , tgi= 23200
Here is the script I tried to work upon and failed.
hTime=linspace(1,1,25000);
time=linspace(1,1,25);
for rr= 1:length(time);
tni= 11707; tmi=16400; tgi=23200;
tnii=tni:(tni+24);tmii=tmi:(tmi+24);tgi=tgi:(tgi+24);
p=polyfit([tnii tmii tgi],[(2.327+0.6.*(rr)) (1.492+ 0.46.*(rr)) (1.2+ 0.3.*(rr))]);
[cofp,sts]=polyval(p,1:length(hTime));
end
Any help is highly appreciated.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Interpolation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!