2 views (last 30 days)

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)

Stephan
on 25 Nov 2020

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

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

Start Hunting!
## 2 Comments

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/661923-solve-the-equation-for-x#comment_1159983

⋮## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/661923-solve-the-equation-for-x#comment_1159983

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/661923-solve-the-equation-for-x#comment_1160008

⋮## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/661923-solve-the-equation-for-x#comment_1160008

Sign in to comment.