MATLAB Answers

Yuriy
0

How to exclude a variable from fit by custom function.

Asked by Yuriy
on 14 Jun 2019
Latest activity Answered by Star Strider
on 14 Jun 2019
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 Comments

Sign in to comment.

Tags

1 Answer

Answer by Star Strider
on 14 Jun 2019

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 Comments

Sign in to comment.