Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by CrisJack

  1. CrisJack

    Calculation of area in plots

    Hi, the numerical integration command (quad) needs a function or an string as input (but I only have the values of the vector (e.g. 5 60 45 3 8 etc.)). I programmed Simpsons rule: %int=1/3*h*[fo+4*(f1+f3+...+f2n-1)+2*(f2+f4+...+f2n-2)+f2n] and the results seem quite reasonable (about 5% error...
  2. CrisJack

    Calculation of area in plots

    Hi, I'm using MATLAB 6.1 and want to calculate the area between the plot of a vector (with given values for the components) and the x-axis. I tried the quad command, but that's for functions only. Also the polyarea command doesn't seem to calculate the area correctly. Can anyone tell me the, if...

Part and Inventory Search