Advertisement
xXx_Fortis_xXx

Untitled

Jun 19th, 2018
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.29 KB | None | 0 0
  1. function bar (x, p)
  2.     figure();
  3.     hold on;
  4.     for i = [1:length(p)]
  5.         t = sqrt(2 * p(i) * (p(i) + x(end)));
  6.         y = [-t:2 * t / length(x):t];
  7.         plot(y.^2 / 2 / p(i) - p(i), y);
  8.         t = sqrt(2 * p(i) * (p(i) - x(1)));
  9.         y = [-t:2 * t / length(x):t];
  10.         plot(-(y.^2 / 2 / p(i)) + p(i), y);
  11.     end
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement