How would I solve the following equation for ZV:
ZV = integral_{0}^{ZD}(z.*A)dz
where
ZD = 40;
z = [1:2:12];%depth
A = [112,118,123,143,188,200];%area
I don't know what you mean by your first code-line :( But look at quad
(http://www.mathworks.de/help/techdoc/ref/quad.html), especially have a closer look at the listed examples :)