Error using symengine Unable to prove '2*(c1 + c2 + 1)^(1/2) == 0 & 35 < 5*c1 + 5*c2 + 5' literally.
조회 수: 3 (최근 30일)
이전 댓글 표시
I run the code and it returns error "Error using symengine Unable to prove '2*(c1 + c2 + 1)^(1/2) == 0 & 35 < 5*c1 + 5*c2 + 5' literally."
Please help me.
clear all
clc
syms c1 c2
S=50;
r=15;
mu=5;
sigma=2;
L=3;
m=5;
mu_ccLm=(c1+c2+(2*L)-m)*mu
sigma_ccLm=((c1+c2+(2*L)-m)^0.5)*sigma
mm=normcdf(S-r,mu_ccLm,sigma_ccLm)
댓글 수: 0
채택된 답변
Walter Roberson
2023년 11월 17일
syms c1 c2
S=50;
r=15;
mu=5;
sigma=2;
L=3;
m=5;
mu_ccLm=(c1+c2+(2*L)-m)*mu
sigma_ccLm=((c1+c2+(2*L)-m)^0.5)*sigma
mm=normcdf(S-r,mu_ccLm,sigma_ccLm)
That is the error message I expect for this situation.
There is no special symbolic normcdf() call, so your parameters are being processed by the normal numeric normcdf() call. Several of the statistics-related functions test input parameters numerically in order, such as if they want to have logic similar to
if sigma > 0
do the normal calculation
else
output 0, or nan, or as appropriate
end
There is not much you can do about this, other than to copy the implementing code for normcdf and editing out the numeric tests.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Assumptions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!