I am trying to solve this equation, but Matlab keep showing error in the equation.
please guide me, where am I making mistake?
syms x
p = 0.89;
a = 6.7;
v = 26.12;
r = 0.07;
L = 78.05;
s = 34.01;
n = 0.33;
m = 0.5;
w = 22.49;
b = -0.06;
T = 50;
fun = p.* exp.^(-exp.^((v-x)./a)) + r.* exp.^(-((x-m)./s).^(-L)) +(1-p-r).*exp((-(1+b.*((x-w)./n))).^(-1./b))-(1-1./T) ==0;
sol = solve(fun,x)

댓글 수: 2

Stephan
Stephan 2020년 11월 25일
How is it different to your other question?
hassan tahir
hassan tahir 2020년 11월 25일
that equation was the mixed equation of PDF and this equation is a mixed equation of CDF. I kind a took integration.
Is it possible to solve this equation?

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

 채택된 답변

KSSV
KSSV 2020년 11월 25일
편집: KSSV 2020년 11월 25일

2 개 추천

Repalce
exp.^()
with smply:
exp()
Also element by element operation not reuqired:
fun = p* exp(-exp((v-x)/a)) + r* exp(-((x-m)/s)^(-L)) +(1-p-r)*exp((-(1+b*((x-w)/n)))^(-1./b))-(1-1/T) ==0;

댓글 수: 1

hassan tahir
hassan tahir 2020년 11월 25일
thank you so much, equation problem solved but still showing error in sol = solve(fun,x)

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

추가 답변 (1개)

Stephan
Stephan 2020년 11월 25일

1 개 추천

Make the changes suggested in the answer from KSSV and use vpasolve:
syms x
p = 0.89;
a = 6.7;
v = 26.12;
r = 0.07;
L = 78.05;
s = 34.01;
n = 0.33;
m = 0.5;
w = 22.49;
b = -0.06;
T = 50;
fun = p.* exp(-exp((v-x)./a)) + r.* exp(-((x-m)./s).^(-L)) +(1-p-r).*exp((-(1+b.*((x-w)./n))).^(-1./b))-(1-1./T) ==0;
sol = vpasolve(fun,x)
gives:
sol =
33.743940154221419170734691781397

댓글 수: 1

hassan tahir
hassan tahir 2020년 11월 25일
really appreciated!!
Basically, this is return period equation. as I change the T values e.g (10,50,100,200), it should gives me different values. but If I put T<72, the answer comes in iota 'i' form.
any idea or suggestion?

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

카테고리

도움말 센터File Exchange에서 Mathematics에 대해 자세히 알아보기

질문:

2020년 11월 25일

댓글:

2020년 11월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by