Need a unique gift idea?
A Pastebin account makes a great Christmas gift


a guest Apr 17th, 2018 55 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. function T = difference_table(Y)
  2. n = length(Y);
  3. %Construct empty forward difference table
  4. T = zeros(n, n);
  5. %Fill first column
  6. T(:,1) = Y;
  7. %Fill remaining columns
  8. for j = 2:n % j is the column index
  9.     for i = j:n % i is the row index
  10.         T(i,j) = T(i,j-1) - T(i-1,j-1);
  11.     end
  12. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand