 # Questions and Reports on Numerical Methods for Engineers

## Question

Solve the following questions and provide a report about the use of FFT for the analysis of seismic data.

Part 1
Write a MATLAB script program that finds both the minimum and maximum of three dimensional functions using the Steepest Ascent Method. Your inputs should be the function and an x and y range from which you will choose multiple starting guesses. Your outputs should be the location of maxima and minima.
- First, create a matrix of at least four starting guesses based on the range
- Evaluate the partial derivatives numerically using the Central Difference Method (not analytically) to determine the direction of maximum gradient
- Use the Golden Search Method to evaluate the maximum of your 2D direction function
- Use the Hessian matrix to determine if you’ve reach a local minimum or maximum.
- Your test script should also plot the locations of the minima and maxima on a 3D plot.
- To evaluate your program, use the function,
Fun=@(q,r) 1.8.^(-1.5*sqrt(q.^2+r.^2)).*cos(0.5*r).*sin(q);

Part 2
Write a MATLAB script program that calculates the Fast Fourier Transform using the Sande-Tukey Algorithm. Use only MATLAB math functions, ie +,-,cos,sin, and the functions imag and real to complete the algorithm in addition to standard logic/loop operators.
- The first part of the script should calculate the algorithm for the real and imaginary parts.
- The second part of the program should employ a bit reversal routine to unscramble the result Fourier coefficients.
- Validate your script with a problem of interest to your field, e.g. NMR, Seismic spectral analysis.

Guidelines for the report:
Each report should include three sections and a working m-file. You do not need to include the entire body of code in your written report, only in your m-file, but you may wish to reference parts of it in the report.
I. Theory and Background
a. A description of the assignment
b. A description of any applicable theory or background
II. Description of Code
a. A description of the content of your code and how it works
b. Discussion of any coding decisions made, i.e. choice of one type of logic
III. Results
a. Any numerical results that came from the code with a description of their importance and meaning
b. Any plots that were created
c. Conclusions
IV. Code (m-file)
a. Include a working m-file in your submission.
b. At the beginning of your script, include a comment with your name, date, assignment number, and a description of the assignment
c. Comment your code throughout the body of the code so that it is easy to understand if you come back to this code months later.

## Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

function xmin=goldensection(f,a,b,tol)
%approximates the minimum of the function f on the interval [a,b]
%using the golden search method with precision tol
%to find a maximum apply the function to -f
k=1; %number of loop counts
s=sqrt(5)/2-1/2; %s is approximately 0.618
a1=a+(1-s)*(b-a);
b1=a+s*(b-a);
fa1=f(a1);
fb1=f(b1);
while (b-a>tol)
if fa1>fb1
a=a1;
a1=b1;
fa1=fb1;
b1=a+s*(b-a);
fb1=f(b1);
else
b=b1;
b1=a1;
fb1=fa1;
a1=a+(1-s)*(b-a);
fa1=f(a1);
end
k=k+1;
end
xmin=a;
end...
\$90.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

### Find A Tutor

View available Numerical Analysis Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

• 1
• 2
• 3
Live Chats