Nonlinear fit to multiple data sets with shared parameters
2 ビュー (過去 30 日間)
古いコメントを表示
Hi all, I have eight sets of voltage vs. current data at different temperatures, for example V vs I @20K , V vs I @ 100K. And I want to use this expression to fit all these eight data sets. V=V(I,T;Rs,T0,nf,Is)=I*Rs/(T-T0)+nf*ln(1+I/(Is*(T-T0)) In the expression, V is the depent variable, I and T is the indepent variables, Rs,T0,nf,Is are fitting parameters shared by all eight sets of data. So how can I do the fitting in Matlab?? Thank you all! Your help will be very appreciated !
0 件のコメント
回答 (2 件)
Taniadi
2012 年 11 月 9 日
I think to fit the data set, you can try to use least square method, that is to minimize the error between calculated value and the experimental value. You can use the 'lsqnonlin' or 'fminsearch' command in the optimization toolbox.
0 件のコメント
Star Strider
2012 年 11 月 9 日
If you want to fit each data set for each temperature independently, this is probably the easiest way:
% Parameters: B(1) = Rs, B(2) = T0, B(3) = nf, B(4) = Is
beta0 = [1E+3; 10; 1; 1E-4].*rand(4,1);
Tv = linspace(20,100,8); % Temperature vector
for k1 = 1:length(Tv)
T = Tv(k1);
Vfcn = @(B,I) I.*B(1)./(T-B(2)) + B(3).*log(1 + I./(B(4).*(T-B(2))));
[Beta,R,J,CovB,MSE] = nlinfit(I, V, Vfcn, beta0);
end
Fitting all T, I and V values at once is possible but a bit more of a challenge.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Linear and Nonlinear Regression についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!