Execution of script Faddeeva_w as a function is not supported:
조회 수: 5 (최근 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?
댓글 수: 0
답변 (2개)
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.
댓글 수: 0
Walter Roberson
2024년 1월 30일
You need to first execute
Faddeeva_build
to configure the remaining functions for use with your system.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!