I tried to plot a vector field in a determined region by two methods: 1- VectorPlot and 2-StreamPlot:

u = beta (x)/(x^2 + y^2)^(3/2));
v = beta (y)/(x^2 + y^2)^(3/2));
VectorPlot[{u, v}, {x, -10, 10}, {y, -10, 10}]
StreamPlot[{u, v}, {x, -3, 3}, {y, -3, 3}]

The problem is that, in the first case, it plots all vectors in the same magnitude. In the second case, it plots only one vector! I guess the reason for the problem could be that u and v become infinite in position(0 and 0). But I don't know how to ignore this point when plotting. Do anyone know how to solve this problem?

  • $\begingroup$ Try adding VectorPoints -> 5 to your VectorPlot to plot more than one vector. Adjust the number of points to suit. $\endgroup$ – MarcoB Jul 27 '17 at 18:22
  • 1
    $\begingroup$ What's beta? And your formulas have unbalanced parentheses, so it's to be sure what your intent is. $\endgroup$ – Itai Seggev Aug 11 '17 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.