Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab integral

  1. Jan 9, 2012 #1
    I want to have a fast way (in Matlab) of computing the following integral:

    [tex] \int_0^z \cos(\theta(z))\ \mbox{d}z\ \forall z \in [0,1] [/tex]

    with [tex] \theta(z) = atan(z) + e^{\int_0^z \chi^2 +a^2\ \mbox{d}\chi} [/tex]

    I used an anomyous functions with a quad function to define the [itex] \theta [/itex] then I used a quadv to evalute the integral. Finally I used a for loop to get the integral for a list of discrete values for z in [0,1]. Of course this takes a lot of computation time, I think this has to do with the fact that quad is used in quadv. How can I make this a lot faster?
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Similar Discussions: Matlab integral
  1. Integration in Matlab (Replies: 3)

  2. Integration in Matlab (Replies: 1)

  3. Integration in matlab (Replies: 0)

  4. Integration in matlab (Replies: 3)

Loading...