フィルターのクリア

Execution of script Faddeeva_w as a function is not supported:

4 ビュー (過去 30 日間)
Thomas
Thomas 2024 年 1 月 30 日
回答済み: Walter Roberson 2024 年 1 月 30 日
Tryying to apply Voigt Model Fit generates the error
[estimates, model] = voigtfit(x, y, initGuess, peakBounds)
Execution of script Faddeeva_w as a function is not supported:
C:\Users\t.pagel\AppData\Roaming\MathWorks\MATLAB Add-Ons\Collections\Faddeeva Package_ complex error functions\Faddeeva_w.m
Error in voigtfit>voigt (line 129)
vp = (1/(sig*sqrt(2*pi))) * real(Faddeeva_w(z)); % Get Voigt from Faddeeva fn.
Error in voigtfit>calc_model_from_nlparams (line 162)
A(:,k) = voigt(x, nlpVec(3*k-2), nlpVec(3*k-1), nlpVec(3*k));
Error in voigtfit (line 80)
peaksCell = calc_model_from_nlparams(initGuess, xdata, ydata);
the model has nbeen added correctly to matlab.
What is the problem?

回答 (2 件)

Dyuman Joshi
Dyuman Joshi 2024 年 1 月 30 日
You have defined the file "Faddeeva_w " as a script.
But you are trying to call it as a function i.e. by providing an input (as the error has highligted), which is not allowed.
Modify the file to define it as a function which accepts an input and provides output(s) as required.
For reference, see - function.

Walter Roberson
Walter Roberson 2024 年 1 月 30 日
You need to first execute
Faddeeva_build
to configure the remaining functions for use with your system.

カテゴリ

Help Center および File ExchangeDynamic System Models についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by