Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Numerically evaluating an equation

  1. Jul 20, 2009 #1
    i have the following equation:

    e^-p (dp/dx) = v*(h/(h-h0)^3)

    i have h0 and values for h for x = -1 to -2 i thought i could use trapz in matlab... but then i have the e^-p... how do i deal with that?

    This is the data i am currently working with:
    The explicit expression for h = h(x) is extremely hard to integrate and i don't think would be worth the effort. Can i do this with trapz?

    x = -2:0.001:-1
    h is calculated using an equation that is extremely hard to integrate.
    if i run the x values through i get data like:
    h = [2e-4, 3e-4, 3.2e-4....]
    i have a value of h0
    and i know that p(-inf) = 0
    I also know the value of v

    Last edited: Jul 21, 2009
  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?
Draft saved Draft deleted