Fitting a Custom Sigmoid
Show older comments
Hello,
I have a set of data that decays in a sigmoidal fashion. I believe it should be a good fit to a function of the form shown in the first screenshot, but when I use the Custom Fit feature in the Curvefitting App matlab gives a -Rsq so something is clearly going wrong. I have attached a screenshot of the attempted fit and result as well. I would really appreciate any advice or input as to why this may not be working and alternatives I could try.
Thank you!


3 Comments
Image Analyst
on 26 Aug 2020
Edited: Image Analyst
on 26 Aug 2020
OK, but you forgot to attach your data. I'll check back later for it.
Why don't I get that plot:
% Create the X coordinates from 0 to 16 every 0.25 units.
X = 0 : 0.25 : 16;
% Define coefficients and function that the X values obey.
a1 = 0.9157 % Arbitrary sample values I picked.
a2 = 0.6557
Y = a1 * exp(-a2 .* exp(X)); % Get a vector. No noise in this Y yet.
plot(X, Y, 'b.-', 'LineWidth', 2, 'MarkerSize', 20);
grid on;

Jane Kelleher
on 26 Aug 2020
Edited: Jane Kelleher
on 26 Aug 2020
Jane Kelleher
on 26 Aug 2020
Accepted Answer
More Answers (0)
Categories
Find more on Smoothing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



