Author Topic: Matlab help  (Read 615 times)

Offline johny91

  • Newbie
  • *
  • Posts: 1
  • Matlab Forum
    • View Profile
Matlab help
« on: July 28, 2011, 11:17:22 PM »
we need our help in this project

1.Write a matlab function M-file defining a function Trapezoidal Rule (f,a,b,n) . This should return an approximation of ∫f(x)dx using trapezoidal rule . Here of course the parameters a and b represent real numbers . The function that you are permitted to substitute for f should either be a built-in matlab funtion (such as sin) or an "inline" function.

2.As before write a matlab function M-file defining a function SimpsomsRule (f,a,b,n).

recall : 10∫4dx/1+x2 = 4arctan(1) = π, Using the two previous M-files , estimate this  integral within tolerance of 10-6 . Fing the number of iterations n in each case .



Matlab and SimuLink Development Forum

Matlab help
« on: July 28, 2011, 11:17:22 PM »