MATLAB: Integral of the area

integrationMATLAB

Hi, I have values ​​in the matrix, I know where they are exactly located, how can I integrate the range of these values?
ErT1{i}=trapz(VVV{i}) ; % VV- array of cells {20 30 31 40}
%they are in the area from 550 to 554
How can I integrate them?

Best Answer

Is it correct?
for i = [20 30 31 40]
t = VVV{i};
ErT1{i} = trapz(t(550:554));
end
% ErT1{i}=trapz(VVV{i}) ; % VV- array of cells {20 30 31 40}
% they are in the area from 550 to 554