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!