Hyperbolic Fitting using multiple data sets from each experiment.
2 ビュー (過去 30 日間)
古いコメントを表示
I have many x values and correspinding y value data set from a experiment, I wish to model it as y = 1 / (a + b*x^c) o
The x values from each data set is different.
0 件のコメント
回答 (1 件)
chicken vector
2023 年 4 月 24 日
編集済み: chicken vector
2023 年 4 月 24 日
data = readmatrix('Model.xlsx');
x = data(:,1);
y = data(:,2);
x = x(~isnan(x));
y = y(~isnan(y));
% Credits @Star Strider
hyprb = @(b,x) 1./(b(1) + b(2).*x.^b(3));
NRCF = @(b) norm(y - hyprb(b,x));
B0 = [1; 1; 1];
B = fminsearch(NRCF, B0);
figure
hold on;
grid on;
plot(x, y, 'pg')
plot(x, hyprb(B,x), '-r')
text(0.7, 0.52, sprintf('y = 1/(%.4f %+.4f x ^{%.4f})', B))
Result:
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!