What error is this??
Afficher commentaires plus anciens
sig_tr_sib=normpdf(norminv(cdf(gamma_sib,SIB)))/(pdf(gamma_sib,SIB)); %transformation
mu_tr_sib=SIB-norminv(cdf(gamma_sib,SIB)).*sig_tr_sib;
Undefined function 'expm1' for input arguments of type 'sym'.
Error in wblcdf>localwblcdf (line 94)
p = -expm1(-z);
Error in wblcdf (line 51)
[varargout{1:max(1,nargout)}] = localwblcdf(uflag,x,varargin{:});
Error in prob.WeibullDistribution.cdffunc (line 223)
[varargout{1:nargout}] = wblcdf(varargin{:});
Error in prob.ToolboxParametricDistribution/cdffun (line 16)
[varargout{1:nargout}] = this.cdffunc(x,pcell{1:min(end,this.NumParameters)},covarg{:},varargin{:});
Error in prob.TruncatableDistribution/cdf (line 153)
y = cdffun(this,x,varargin{:});
Error in NewTopplingRIA (line 348)
sig_tr_sib=normpdf(norminv(cdf(gamma_sib,SIB)))/(pdf(gamma_sib,SIB)); %transformation
Réponses (1)
Star Strider
le 13 Mar 2021
0 votes
The expm function can accept symbolic arguments, however expm1 cannot.
4 commentaires
Walter Roberson
le 13 Mar 2021
Expanding further: many functions in the statistics toolbox cannot accept symbolic values.
A lot of the stats functions have simple bounds tests such as the inverse cdf checking that the inputs are in the range 0 to 1. Symbolic expressions cannot use those tests: if x<0 cannot be resolved when x involves a symbolic variable.
Star Strider
le 13 Mar 2021
Walter — Thank you for expanding on that.
The solution would likely be to use erf and its friends, that do take symbolic arguments. They would need to be modified slightly to work as the normal distribution, however that information is in the documentation.
MANOJ KUMAR
le 14 Mar 2021
Star Strider
le 14 Mar 2021
My pleasure.
Catégories
En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!