From: Kevin Bachovchin on 22 Jan 2010 21:56 I have a function called CalculateE, which determines the electric field given x and y. In another script, I want to integrate this function from x = a to x = b and at a given y. In this script currently I call ETotal = quad(@CalculateE, a, b) to perform the integration in the x-direction. Is there a way using this command that I can pass the (constant) value of y into the function I am integrating?
From: us on 23 Jan 2010 03:46 "Kevin Bachovchin" <kbachovc(a)andrew.cmu.edu.edu> wrote in message <hjdog6$9oq$1(a)fred.mathworks.com>... > I have a function called CalculateE, which determines the electric field given x and y. In another script, I want to integrate this function from x = a to x = b and at a given y. In this script currently I call ETotal = quad(@CalculateE, a, b) to perform the integration in the x-direction. Is there a way using this command that I can pass the (constant) value of y into the function I am integrating? a hint: help quad; % then, peruse the last example, which shows you how to do it... us
|
Pages: 1 Prev: bug in "solve" Next: use of roi(region of interest) on watershed segmented image |