1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Solving set of non-linear equations with two unknowns in MATLAB

  1. Jul 20, 2012 #1
    Hi,
    I have two non-linear equations with two unknowns, i.e., tau and p. both equations are:
    p=1-(1-tau).^(n-1)
    and
    tau - 2*(1-2*p) ./ ( (1-2*p)*(W+1)+(p*W).*(1-(2*p).^m)).

    I am interested to find the value of tau.
    After doing some research on internet I came to know that these equations can be solved by finding roots and finding fixed points. However, the problem is not that straight as it involves two non-linear equations, as opposed to various examples I found on internet which involves only one non-linear equation.
    Additionally, I have matlab code for solving this problem, but still spending few days to understand and searching internet relentlessly, I couldn't understand how this solution actually works. Below I am giving that matlab code and need your helping hand to explain it to me the actual logic behind solving 'set of non-linear equations.

    Matlab M-file is:

    function result=tau_eq(tau)

    n=6;
    W=32;
    m=5;

    p=1-(1-tau).^(n-1);
    result=tau - 2*(1-2*p) ./ ( (1-2*p)*(W+1)+(p*W).*(1-(2*p).^m));

    Command at the command window:
    result=fzero(@tau_eq,[0,1],[])
    output is:
    result =

    0.0448

    The given result is satisfactory, however I do not understand the logic behind it. Any explanation or referring to useful resources will be highly appreciated.
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?



Similar Discussions: Solving set of non-linear equations with two unknowns in MATLAB
Loading...