Hi all. I would like to write a code to perform the romberg integration (RI) using the trapezoidal rule as the basis. I would like the function to integrate any proper function of my choosing for any desired level. Being succinct is a definite plus. I am not sure how familiar the people on these boards are with numerical methods, particularly in the form of numerical integration using RI, but was hoping if someone could give me some pointers on where to start as I am a bit new to coding and this kind of math. Oh and I would like to do this in MATLAB. I realize that I have two duplicate topics and that is because I realized that this subforum is more appropriate for my question. Please delete the one in the Calculus forum if necesary.