What error is this??

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

Answers (1)

Star Strider
Star Strider on 13 Mar 2021

0 votes

The expm function can accept symbolic arguments, however expm1 cannot.

4 Comments

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.
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.
Thank you.
My pleasure.

Sign in to comment.

Categories

Asked:

on 13 Mar 2021

Commented:

on 14 Mar 2021

Community Treasure Hunt

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

Start Hunting!