Area under Curve REVERSED

  • Thread starter rebelsnake
  • Start date
  • #1

Main Question or Discussion Point

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
 

Answers and Replies

Related Threads on Area under Curve REVERSED

  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
1
Views
568
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
2
Views
537
Replies
11
Views
2K
Replies
1
Views
1K
Replies
3
Views
970
Replies
1
Views
4K
Top