In modern science and engineering, numerical methods play an important role. Scientific exploration is often supplemented by computers and sometimes conducted on computers rather than laboratory equipment. Even some of the laboratory equipment such as spectrum analyzers employ digital algorithms to produce test results. Thus, our department requires our budding mechanical and biomedical engineers to take CPE 111, Intro to Engineering Computation, in which they learn how to solve problems using MATLAB®. Our electrical and computer engineers, on the other hand, are introduced to the world of computing in CSC 101 using the C programming language with the added bonus of LabVIEW® in EGR 325, the Signals & Systems course. Overseeing both CPE 111 and EGR 225, I am always on the lookout for fun examples in which students can learn programming concepts while trying to solve what they will perceive as real-world problems. Having taught MAT 350, Numerical Methods, this semester I came across Monte Carlo integration which is a good candidate for teaching about for loops and, because of the number of calculations involved, about timing issues. Methods that simulate natural phenomena based on probabilities make extensive use of random numbers and are called Monte Carlo methods. Monte Carlo integration involves generating random values for the independent and dependent variables, checking to see if the function applied to the randomly generated independent variables is less than or equal to the value of the randomly generated dependent variable (a success). After a large number of such trials, the count of successes divided by the total number of trials, with appropriate scaling, is an estimate of the area or volume under the function, i.e., the integral of the function. This paper will describe Monte-Carlo integration and provide examples that can be used in CPE 111 with MATLAB and in EGR 225 with LabVIEW. We will also observe the execution timing of the same problems on both platforms.
No takes yet. Share an insight, caveat, or question.
Murat Tanyel (2024) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: