## Integration within particular range

### Manish Kumar (view profile)

on 12 Mar 2019
Latest activity Commented on by Manish Kumar

on 12 Mar 2019

### Torsten (view profile)

Dear All,
I want to integrate the x, y. I use trapz(x,y). It gives me 1000. X-range id 0 to 4.45. But how to integrate with upper limit and lower limit i.e. 2 to 3. How to do it ? x is the first column and y is the 2nd column of the attached excel sheet.

Torsten

### Torsten (view profile)

on 12 Mar 2019
x ranges from 0.3 to 4.4. How do you want to integrate from 100 to 500 ? Or do you mean the row number ?
Manish Kumar

### Manish Kumar (view profile)

on 12 Mar 2019
i have edited the question.

### Torsten (view profile)

on 12 Mar 2019

idx = x>=2 && x<=3;
xp = x(idx);
yp = y(idx);
value = trapz(xp,yp)

Manish Kumar

### Manish Kumar (view profile)

on 12 Mar 2019
Error is coming. I am attching the scrrenshot
Torsten

### Torsten (view profile)

on 12 Mar 2019
idx = (x>=2 & x<=3);
Manish Kumar

on 12 Mar 2019
Thank you sir