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

Area under Curve REVERSED

  1. Aug 30, 2009 #1
    Area under Curve REVERSED!!

    ok now I have got a plot b/w x & y, which produced a curve
    using trapz function I evaluated the area
    now the important thing is that I have to take say 10% of the evaluated area & want to find at which coordinates 10% of the caculated area approaches to; similarly which coordianes correspond to 20% 30% of the original calculated area


    Code is
    x=[0.8 0.7125 0.6375 0.534 .381 0]

    x =

    0.8000 0.7125 0.6375 0.5340 0.3810 0

    >> conversion=x;
    >> y=[1/0.4 1/.8 1/1.2 1/2 1/4 0]

    y =

    2.5000 1.2500 0.8333 0.5000 0.2500 0

    >> rate=y;
    >> plot(conversion,rate)
    >> color=[010];
    >> basey = min(0,min(y));
    h = fill([x x(end) x(1)], [y basey basey], color);
    >> %area under curve shaded
    >> area=trapz(conversion,rate)

    area =

    -0.4162

    >> area=trapz(conversion,-rate)

    area =

    0.4162
     
  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



Similar Discussions: Area under Curve REVERSED
  1. COV area under a curve (Replies: 1)

  2. Area under a curve? (Replies: 2)

  3. Area Under the Curve (Replies: 6)

Loading...