Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function bar (x, p)
- figure();
- hold on;
- for i = [1:length(p)]
- t = sqrt(2 * p(i) * (p(i) + x(end)));
- y = [-t:2 * t / length(x):t];
- plot(y.^2 / 2 / p(i) - p(i), y);
- t = sqrt(2 * p(i) * (p(i) - x(1)));
- y = [-t:2 * t / length(x):t];
- plot(-(y.^2 / 2 / p(i)) + p(i), y);
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement