The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Problem 10! Coding through MATLAB or Python.
Thank you very much!
Â
2*Problem 9.LetA="1000#. DetermineN(A) andR(A). Are they equal? Is this true in general? Ifthis is true in general, prove it; if not, provide a counterexample.*Problem 10.Suppose we want to approximate the derivative of a functionf(x) that is sampled on the gridx1,...,xnwherexi+1=xi+δ. Then we might do so using the expression∂f(x)∂x|x=xi≈f(xi+1)-f(xi)δWhenδ= 1, this yieldsf0(xi) :=∂f(x)∂x|x=xi≈f(xi+1)-f(xi).We can express this relation via a matrix-vector product wheref0(x1)f0(x2)...f0(xn)=Dnnf(x1)f(x2)...f(xn),whereDnnis the so-called Frst difference matrix between and is given by(1)Dnn=-11-11......-111-1.Note that settingDnn(n,1) = 1,corresponds to the approximationf0(xn)≈f(xi)-f(xn).This is referred to as a periodic differentiation rule which is associated with a periodic boundary conditonbecause we are assuming that the domain wraps around. Notice thatDnnis a circulant matrix and so itseigenvectors can be computed in closed form!The goal of this exercise is to derive the analog ofDnnfor 2-D differentiation. To that end, letf(x,y) be afunction of two variables. We can approximate its partial derivatives using Fnite differences as follows:(2)∂f(x,y)∂x≈f(x+ 1,y)-f(x,y)(x+ 1)-x=f(x+ 1,y)-f(x,y)and(3)∂f(x,y)∂y≈f(x,y+ 1)-f(x,y)(y+ 1)-y=f(x,y+ 1)-f(x,y),To simplify notation, let us deFne them×nMATLABmatricesFXY,DFDX, andDFDYsuch that
Attachments:
-----------