Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

P4) We would like to determine the approximate value of [ f Cx)dx using'n' rectangles (a) Write a MATLAB function defined below: function [appInteg]-myIntegWithFuncHandle (func,

image text in transcribed
P4) We would like to determine the approximate value of [ f Cx)dx using'n' rectangles (a) Write a MATLAB function defined below: function [appInteg]-myIntegWithFuncHandle (func, limVec, n) %Function file: my IntegwithFuncHandle.m % Purpose: % Calculate approximate integral of function specified in func 8 between the lower/upper limits specified in limVec using n % rectangles %Record of revisions (Date Programmer I change): Date I Name I original program %inputs : % func - function handle defined as [f, dfx-func-name (x) for % lmvec- (1x2) vector containing limits of integral; limvec(1) is %n Outputs: calculating f(x) and f (x) lower 1imit and limVec (2) is upper limit. - (1x1) number of rectangles % app Integ- (1x1) approximate value of integral (b) Using function handles to myF1 and my2 as inputs for myIntegWithFuncHandle, calculate the approximate value of f(x)dx for f(x)-x'e and f(x)-7sin(x)e -1 using 10, 100 and 1000 rectangles

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Knowledge Discovery In Databases

Authors: Gregory Piatetsky-Shapiro, William Frawley

1st Edition

ISBN: 0262660709, 978-0262660709

More Books

Students also viewed these Databases questions