How to exclude a variable from fit by custom function.

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?

回答 (1 件)

Star Strider
Star Strider 2019 年 6 月 14 日

0 投票

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);

カテゴリ

ヘルプ センター および File ExchangeInterpolation についてさらに検索

タグ

質問済み:

2019 年 6 月 14 日

回答済み:

2019 年 6 月 14 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by