When doing my research to see how are real functions fitted in MATLAB, no answer has been found. Only the fitting of complex functions is proposed. Why is that?
Thanks in advance :^)

8 件のコメント

Rik
Rik 2020 年 12 月 10 日
What do you mean? I don't believe I have seen any complex function being fitted yet (although I don't doubt it is possible).
wallflower
wallflower 2020 年 12 月 10 日
編集済み: wallflower 2020 年 12 月 10 日
Functions written according to s (jwf). Check for example the MATLAB function rationalfit ...
Rik
Rik 2020 年 12 月 10 日
I don't have that toolbox, so I can't comment on why that is only complex-valued.
I'm much more familiar with the standard fit function. Plenty of example of real-valued functions being fitted.
I suspect the answer to your why question is the domain: I would guess the function in RF analysis are simply complex-valued by design or convention.
wallflower
wallflower 2020 年 12 月 10 日
I guess I now know what I said wrong. I didn't not express myself correcty. I agree with your answer. What I want is a rational approximation of real functions not polynomial approximations... I hope my english made it safe!
Rik
Rik 2020 年 12 月 10 日
I don't understand what you want well enough to be able to help you.
wallflower
wallflower 2020 年 12 月 10 日
I have a frequency dependent resistance R = r(f) as a form of scatter plot. I want to fit the scatter plot using rational functions so I can easily deduce the equivalent electrical circuit that will generate the same frequency behavior as that of R.
riccardo
riccardo 2020 年 12 月 10 日
The curve fitting tool seems to have the rational function as an option.
Alternatively, you could always revert to using "fzero" or "fminsearch", by converting your problem to minimising the residuals of:
<YourFunctionR>(f) * <denominator polynomial> - <numerator polynomial> = 0
wallflower
wallflower 2021 年 1 月 4 日
Thank you riccardo :D

サインインしてコメントする。

 採用された回答

Steven Lord
Steven Lord 2020 年 12 月 10 日

0 投票

There is a collection of library models that can be used with functionality in Curve Fitting Toolbox. One type of model included in that collection is 'rational', which contains polynomials of degree up to 5 for both the numerator and denominator. If that's not sufficient, you can also create your own custom model.

その他の回答 (0 件)

カテゴリ

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

製品

リリース

R2019b

質問済み:

2020 年 12 月 10 日

コメント済み:

2021 年 1 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by