Integration of a function given by a table



Frustrated by my attempts to integrate a function with respect x,
which contains a function containing several functions with definite
integrals with respect to z, by means of nested functions, I have
decided to generate a table of values in the hopes that I could
integrate that table. Here's what I mean:

clear;
l = 1;
eta = 3.32890;
lam = 0.8776;
x = 0:0.017552:lam;

for j = 1:51
if x(j)==lam
G2(j)= 0
else
c2 = @(z)z.^2./sqrt(z.^2-x(j).^2);
c3 = @(z)lam.*sqrt(z.^2-x(j).^2)./(z.*sqrt(z.^2-lam.^2));
c4 = @(z)(z.^2)./sqrt(z.^2-x(j).^2);
c5 = @(z)z.*sqrt(z.^2-lam.^2)./(lam.*sqrt(z.^2-x(j).^2));
G2(j) = 2./(lam.*l).*quad(c2,x(j).*(1+eps), lam.*(1-eps));
G3(j) = (2./l).*quad(c3, lam.*(1+eps), l.*(1-eps));
G4(j) = (2./(l.*lam)).*quad(c4, lam.*(1+eps), l.*(1-eps));
G5(j) = (2./l).*quad(c5, lam.*(1+eps), l.*(1-eps));

Wp(j)=(2*asin(lam./l).*sqrt(1-(x(j)./l).^2)+(- G2(j) + G3(j)
- G4(j) + G5(j)))./pi
end
end

With these points I get a perfectly good curve. How can I define this
table of values as a function so that I can then integrate it from
zero to lam?

Michael
.



Relevant Pages

  • integration by quad or symbolically
    ... G = int(integrand, z, lam, 1) ... Gint = int(G, omega, 0, zeta) ... I know that these integrals exist, because I've found them using the ...
    (comp.soft-sys.matlab)
  • Re: Integration of a function given by a table
    ... >> integrals with respect to z, by means of nested functions, I ... Hi Michael! ... First, please do not top-post. ... then don´t bother to post at all. ...
    (comp.soft-sys.matlab)
  • Re: Is this quantity an "action"?
    ... The peridogram is done over the signal X. ... and then using the MVT for integrals to reduce it to this form. ... you can convince yourself that the form is correct. ... Prev by Date: ...
    (sci.physics)
  • Re: Question about Lebesque Integral
    ... > I don't see how this follows from the basic definition of I as supremum ... The definition using suprema of integrals of simple functions ... To show the second equation, ... Prev by Date: ...
    (sci.math)
  • Re: hp 49g+ vs Ti 89 titanium
    ... The units come in handy as a good double check to make sure everything ... For integrals, I like the HP better, as the step by step option is very ... I sold my TI-89 to get a HP 49g+ for very similar classes as ... Prev by Date: ...
    (comp.sys.hp48)

Loading