Advertisement
Guest User

Untitled

a guest
Nov 10th, 2016
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. y = @(x)log(x);
  2.  
  3. % Ask user for input values for h and M
  4. % M denotes the number of steps of the algorithm.
  5.  
  6. h = input('Input value h: ');
  7. M = input('Input value M: ');
  8.  
  9. %Initialize an MxM matrix
  10. D = zeros(M);
  11.  
  12. disp(phi) = (1/(2*h)) * (y(x+h) - y(x-h));
  13.  
  14.  
  15.  
  16.  
  17.  
  18. Input value h: 1
  19. Input value M: 2
  20. Undefined function or variable 'x'.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement