필터 지우기
필터 지우기

lsqcurvefit Problem looping it

조회 수: 1 (최근 30일)
Meddour Aissam riad
Meddour Aissam riad 2020년 2월 19일
Hi,
i'm using 'lsqcurvefit ' to resolve an optimization problem (finding three coefficient c(1),c(2) and c(3))
i have the following objectiv function :
fitfcn = @(c,Var)Capa*(1+c(1).*sqrt(Var(:,1)).*(c(2).^((Var(:,2)-T0)./DELTAT).*c(3).*(Var(:,3)-V0)./DELTAV))
i must find the three coeffetion with what i'll calculate a vector this way
for Cycle=1:1:10
%Decalre Model
for j=1:1:length(Temps)
fcn(Cycle) =Capa*(1+c(1).*sqrt(Var(j,1)).*(c(2).^((Var(j,2)-T0)./DELTAT).*c(3).*(Var(j,3)-V0)./DELTAV));
end
Capa=fcn(Cycle);
end
the thre coefficient must help be to reduce the error between the result of the last calculation and a vector of ten values (that's why we're calculating with Cycle=1:1:10
show should i realise that since i can't i don't know if i should put [xfitted,errorfitted] = lsqcurvefit(fitfcn,c0,Var,ydata,lb,ub) inside or outside the loop

답변 (0개)

카테고리

Help CenterFile Exchange에서 Optimization Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by