Non-linear Curve Fitting Issue with Experimental Data
Mostrar comentarios más antiguos
I am using the MATLAB curve fitting tool to fit the following data given in matrices A(:,1) through A(:,7). Data in A(:,1)-A(:,7) are y-axes results while the x-axes, given in matrix B, remains the same for all. I have attached the data as .mat file to this post.
Objective: To fit the data (given A, B in data.mat) with a single function

What I have tried so far: I have used the curve fit to fit the data using power function. Although matric A(:,1)-A(:,4) fit pretty well, I am unable to fit A(:,5)-A(:,7) since they have an exponential decay that is difficult to be captured using power functions. Also, note that the data along the x-axes does not saturate as the x is increased.
Below is an image of the curve fit that I tried and it does not seem to satisfy the fast decaying data given in darker (black) lines in the plot.

Here is the code that I am currently using for reference:
color_array = linspace(1,0,length(VG_array));
for k=1:7
base_floor(min(abs(A(:,k)))<9e-12) = min(abs(A(:,k)));
base_floor(min(abs(A(:,k)))>9e-12) = 0;
semilogy(B,A(:,k),...
'Color',[color_array(k) 0 0]);
hold on;
f = fit( B', A(:,k), 'power1' );
options = fitoptions('power1');
options.Robust = 'Bisquare';
plot(B,(f.a*B.^f.b)+base_floor,'--')
hold on;
parameters_wb_delta(:,k) = f.a;
parameters_wb_gamma(:,k) = f.b;
end
What I need help with: I need a single function fit that can capture all the data in the matrices A(:,1)-A(:,7) with respect to B.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Linear and Nonlinear Regression en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
