Question: Please help with this. It is a Matlab Problem. Problem 1.1 In numerical methods, there are often many ways to make a calculation that gives

Please help with this. It is a Matlab Problem. Please help with this. It is a Matlab Problem. Problem 1.1 Innumerical methods, there are often many ways to make a calculation that

Problem 1.1 In numerical methods, there are often many ways to make a calculation that gives the same answer but at very different efficiencies (i.e., one method is faster than another). In this problem we will consider one such calculation. In molecular dynamics we often need to compute the so-called Lenard-Jones Potential: a mathematically simply model approximating the interactions strength between two neutral (uncharged) particles. If the Euclidean distance between the two particles is r then LJ = r-+ ,T Let us assume that two particles are located one at (1, 0, 3) and another at (2,-1, -1) and that two methods are available for the calculation of LJ, namely Method 1 (1) Calculate r--Jax2 + + 2 (2) Calculate LJ = Methods.2 (1) Calculate r2-Ax2 + Ay2 + Az2 (2) Calculate -2 (4) Calculate r12 (5) Calculate LJ =-+r12 You would like to figure out which of the two methods is faster. >>> PAUSE HERE AND TRY TO GUESS WITHOUT DOING ANY CALCULATIONS elapsedTime 0.0176 which gives you the time it took do perform the loop in seconds. Finally, produce a log-log plot showing the time that is required to perform the calculations for the two methods versus the number of calculations. Use the Publish command to generate a report, save it as a pdf file and submit the pdf file Problem 1.2 Consider the sum S1n Write a Matlab function file that computes the sum and makes a semi-x plot of the values of this sum as a function of k for k-1,2,., 1000. Your numerical answer should suggest what the value of this sum approaches as k -> oo Use the Publish command to generate a report, save it as a pdf file and submit the pdf file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!