Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. syms x_1 x_2 x_int x x_hk sigma
  2. h(x_1, x_2) = sign(x_1-x_2)*sqrt(abs(x_1-x_2))
  3. h(x_int) = subs(h(x_1, x_2), x_1-x_2, x_int)
  4.  
  5. heat_kernel(x_hk, sigma) = exp(-(x_hk)^2/(2*sigma^2))/(sqrt(2*pi*sigma^2))
  6. assume(sigma, {'real', 'positive'})
  7. g(x, sigma) = int(heat_kernel(x-x_int, sigma)*h(x_int), x_int, -inf, inf)
  8.  
  9. fplot(h(x_int), [-0.4, 0.4])
  10. hold on
  11. fplot(g(x, 0.05), [-0.4, 0.4])
  12. fplot(g(x, 0.1), [-0.4, 0.4])
  13. fplot(g(x, 0.01), [-0.4, 0.4])
  14. legend(["h(x)", "g(x, 0.05)", "g(x, 0.1)", "g(x, 0.01)"], 'Location', 'NorthEastOutside')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement