Use matlab6. Numerical differentiation: (1) avec = [1 2 3 3 6 8] , diff(avec,2) computes the
Fantastic news! We've Found the answer you've been seeking!
Question:
Use matlab6. Numerical differentiation: (1) avec = [1 2 3 3 6 8] , diff(avec,2) computes the second difference by applying diff(avec) recursively 2 times, and write the answer of diff(avec,2). (2) bMat = [2 2 2; 4 4 4; 20 20 20] , diff(bmat,1,1) computes the first difference of bMat along the first dimension, and write the answer of diff(bMat,1,1). (3) cMat = [2 3 5; 4 5 8; 5 6 9] , gradient(cMat) computes the numerical gradient of cMat, and write the answer of gradient(cMat).
Related Book For
Numerical Methods for Engineers
ISBN: 978-9352602131
7th edition
Authors: Steven C. Chapra, Raymond P. Canale
Posted Date: