How to do iteration to solve a nonlinear equation with 1 variable?

I need help to solve this equation: z2=0.0065; z1=0.316; P=101.325; P1=5.32; H=202245
z1=(1-z2/(1-V+P1*V/P))*(1-V+H*V/P)
In this equation, the only unknown variable is V and I want to solve for it. Is there a way to solve it without making a "function" file. Thanks

 Accepted Answer

V0 = fzero(@(V)z1-(1-z2/(1-V+P1*V/P))*(1-V+H*V/P),5)

2 Comments

What do I need to do if I want to repeat the calculation with different values for P1 and H to get new values for V? I want to keep all the old values of V

Sign in to comment.

More Answers (0)

Categories

Asked:

on 6 Oct 2015

Commented:

on 6 Oct 2015

Community Treasure Hunt

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

Start Hunting!