フィルターのクリア

der add-on Funktion erzeugt nachfolgende Fehler. Wie lässt sich das Problem lösen?

1 回表示 (過去 30 日間)
Thomas
Thomas 2024 年 1 月 4 日
コメント済み: Thomas 2024 年 1 月 11 日
f=fittype("lorentzfit")
Error using fittype>iCreateFromLibrary
Library function lorentzfit not found.
Error in fittype>iCreateFittype (line 345)
obj = iCreateFromLibrary( obj, varargin{:} );
Error in fittype (line 330)
obj = iCreateFittype( obj, varargin{:} );
  4 件のコメント
Thomas
Thomas 2024 年 1 月 5 日
移動済み: madhan ravi 2024 年 1 月 5 日
Lorentzfit.m ist ganz offiziell als MATLAB-add on runterzuladen und zu installieren. Der Fit läuft auch, wenn man die Funktion
y=lorentzfit(x,y)
aufruft. Allerdings kann ma n sich so nicht die berechneten Koeffizienten ansehen, weil der beschrieben Fehler auftaucht, wenn man z.B.
ft=fitteype('lorentzfit') aufruft, was wohl nötig ist, um an die Koeffizienten zu kommen
madhan ravi
madhan ravi 2024 年 1 月 5 日
Kannst du den Link verlinken?

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

回答 (1 件)

Vinayak
Vinayak 2024 年 1 月 8 日
Hi Thomas,
Da ich kein deutscher Muttersprachler bin, versuche ich, diese Frage auf Englisch zu beantworten. Danke für Ihr Verständnis.
I understand that you wish to extract the calculated coefficients from the “lorentzfit” of your data.
The inbuild MATLAB “fittype” function doesn’t support “lorentzfit”. I'm assuming that you might be using the “lorentzfit” function from the MATLAB File Exchange. If that's not the case, I would suggest considering its use, as it conveniently supports variable outputs, including yprime, params, resnorm, residual and jacobian. Specifically, the “params” output contains the calculated coefficients, which you can access as shown in the sample code below:
% Your data vectors x and y
x = -16:0.1:35;
y = 19.4./((x - 7).^2 + 15.8) + randn(size(x))./10;
% Call the lorentzfit function
[yprime, params, resnorm, residual] = lorentzfit(x, y);
% Access the coefficients from the params variable
a = params(1);
b = params(2);
c = params(3);
d = params(4);
The “params” variable conveniently contains the coefficients [a, b, c, d] of the Lorentzian fit, which you can then use for further analysis or reporting.
I hope this helps you with your project. Feel free to reach out for further clarifications.
  1 件のコメント
Thomas
Thomas 2024 年 1 月 11 日
Thank you for your help. I am not so experienced in Matlab tools but now it works sufficiently.

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

Community Treasure Hunt

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

Start Hunting!