normcdf and norminv for symbolic function

조회 수: 7 (최근 30일)
Virginie Marchionni
Virginie Marchionni 2018년 3월 28일
댓글: Virginie Marchionni 2018년 3월 29일
I've to compute a particular density function and to get it I wanted to differentiate its Cdf. The Cdf depends on the function normcdf and norminf but Matlab returns Errors on multiple stuff! I suppose the problem is on the normcdf and norminv function but I tried different way to handle the problem unsuccessfully
syms x
cond = x>0 & x<=1;
assume(cond)
Cdf= normcdf(-(k-sqrt(1-rho)*norminv(x))/sqrt(rho)); % k and rho are constants I've previously defined in my code
density= diff(Cdf,x);

채택된 답변

Torsten
Torsten 2018년 3월 29일
편집: Torsten 2018년 3월 29일
fun = -(k-sqrt(1-rho)*norminv(x))/sqrt(rho);
density = 1/sqrt(2*pi)*exp(-fun^2/2)*diff(fun,x)
Best wishes
Torsten.
  댓글 수: 3
Torsten
Torsten 2018년 3월 29일
And what happens if you remove this condition ?
Virginie Marchionni
Virginie Marchionni 2018년 3월 29일
The same errors

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by