How to exclude a variable from fit by custom function.
5 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a custom function y= a+g/(exp(T/x)-1) where T is a constant which has been already calculated.
I want to fit my data set by using a and g only. How to state that T is already predefinded and should be excluded from the fitting?
0 个评论
回答(1 个)
Star Strider
2019-6-14
Try this:
T = 42; % Defined In Your Workspace
y = @(a,g,x) a+g./(exp(T./x)-1);
To use it with other toolboxes:
y = @(b,x) b(1)+b(2)./(exp(T./x)-1);
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!