TRAPZ(x,y) QUAD(FH,A,B) DBLQUAD(FH,XMIN,XMAX,YMIN,YMAX) TRIPLEQUAD(FH,XMIN,XMAX,YMIN,YMAX,ZMIN,ZMAX) Creating a function handle,

TRAPZ(x,y) QUAD(FH,A,B) DBLQUAD(FH,XMIN,XMAX,YMIN,YMAX) TRIPLEQUAD(FH,XMIN,XMAX,YMIN,YMAX,ZMIN,ZMAX) Creating a function handle,

TRAPZ(x,y) QUAD(FH,A,B) DBLQUAD(FH,XMIN,XMAX,YMIN,YMAX) TRIPLEQUAD(FH,XMIN,XMAX,YMIN,YMAX,ZMIN,ZMAX) Creating a function handle, FH, from a function, f: 1- inline object: FH=inline(f) 2- function handle: Write a m_file with the name filename.m in the following format: function z=filename(x,y) z=f(x,y) [email protected] Trapz computes the integral of Y with respect to X using the trapezoidal method Cumtrapz computes the cumulative integral of Y with respect to X using

trapezoidal integration. x=linspace(-1,2,100); y=humps(x); format long Area=trapz(x,y) plot(x,y) grid on xlabel(x) ylabel(humps(x)) title(integral of humps) z=cumtrapz(x,y) hold on plot(x,z) hold off

Area =26.34473119524596 y=inline('1./(x.^3-2*x-5)') Q = quad(y,0,2) Answer: y= test2a.m file: function y=test2a(x) y=1./(x.^3-2*x-5); quad(@test2a,0,2) ans =

Inline function: y(x) = 1./(x.^3-2*x-5) Q= -0.4605 -0.4605 Evaluates the double integral of f(X,Y) over the rectangle XMIN <= X <= XMAX, YMIN <= Y <= YMAX. f can be an inline object or a function handle. Q = dblquad(inline('y*sin(x)+x*cos(y)'), pi, 2*pi, 0, pi) or Q = dblquad(@integrnd, pi, 2*pi, 0, pi) where integrnd.m is an M-file: function z = integrnd(x, y)

z = y*sin(x)+x*cos(y); Answer: Q= -9.86960437725457 evaluates the triple integral of FUN(X,Y,Z) over the three dimensional rectangular region XMIN <= X <= XMAX, YMIN <= Y <= YMAX, ZMIN <= Z <= ZMAX. Q = triplequad(inline('y*sin(x)+z*cos(x)'), 0, pi, 0, 1, -1, 1) Answer: Q= 1.99999999436264 b

F dl a E ds s V V

dV b E dl a Q = quad(inline('-18.*sin(phi).*cos(phi)'),(pi/2),pi) Q= 8.99999998379294

Recently Viewed Presentations

  • Model-

    Model-

    George Edwards [email protected] Center for Systems and Software Engineering University of Southern California Presentation Outline Introduction and Background Architecture Description Languages Model-Driven Engineering Project Overview Goals and Approach XTEAM Extensible Modeling Environment ...
  • City of Toronto Wellbeing Toronto Indices towards Measuring

    City of Toronto Wellbeing Toronto Indices towards Measuring

    HS Students Passing OSSLT. HS Drop-out Rates. HS Students Applying to Universities * Community-based services analysis of service gaps will include other factors in addition to geographic proximity, where available, such as facility capacities, access factors such as hours etc....
  • Database Security - KSU

    Database Security - KSU

    A sequence is generated and incremented (or decremented) by an internal Oracle routine. This can be time-saving because it Replaces application code. Speeds up the efficiency of accessing sequence values when cached in memory. Sequence numbers are stored and generated...
  • IBM System Storage DS3500 Express Storage System

    IBM System Storage DS3500 Express Storage System

    IBM System Storage DS3500 Express Storage System ***Confidential*** * In this example we have added the 8 Gbps daughter card to each controller. In this instance, the DS3500 can support up to four SAS host ports native with eight FC...
  • Sentence Construction - Lawndale High School

    Sentence Construction - Lawndale High School

    Sentence Pattern #3 Sentence Pattern #4 Introductory participles Examples of sentences with introductory participles (Pattern 4 sentences) Sitting alone in front of the t.v., Marcy regretted that she turned down Marvin's invitation to go to the party. Feeling guilty about...
  • HRT 3M World Religion

    HRT 3M World Religion

    The Religious Impulse. Religion has probably been around even longer than humans! Neanderthals showed an understanding of a supernatural force. The common thread among countless human religions is the instinct or impulse to worship something.
  • Library of Congress Lesson 15 - Georgia Institute of Technology

    Library of Congress Lesson 15 - Georgia Institute of Technology

    ,a /ory c5t]+ on a s+le dramatic 9cid5t is call$ a .%ort ./ory4 .,! .,necklace is a p]fect example4 Consecutive items emphasized for different reasons cont. A dash (or ellipsis, 15.3) occurring in the middle of an emphasized passage does...
  • FREE PITCH DECK TEMPLATE Download Free PowerPoint Pitch

    FREE PITCH DECK TEMPLATE Download Free PowerPoint Pitch

    Mark Smith /CEO. Lorem ipsum dolor sit amet, consecteturadipiscingelit, sed do eiusmodtemporincididuntutlabore et dolore magna aliqua. Utenim ad minim veniam ...