Tag Info

New answers tagged

4

Look at this: VectorPlot[{ x Cos[Sqrt[x^2 + y^2]]/Sqrt[x^2 + y^2], y Cos[Sqrt[x^2 + y^2]]/Sqrt[x^2 + y^2] }, {x, -3, 3}, {y, -3, 3}] Functions start with capital letters, so for example Sin instead of sin. In Mathematica parenthesis aren't used to encapsulate arguments; square brackets are. Write Cos[x] instead of Cos(x).


2

I hope this is helpful (if I interpret your aim correctly): This is a little more challenging for your particular function. g[x_, y_] := {-5.4 E^(-2.25 ((-4 + x)^2 + (-2.5 + y)^2)) (-4 + x) - 6.4 E^(-4 ((-3.5 + x)^2 + (-1.5 + y)^2)) (-3.5 + x) - 8 E^(-4 ((-3 + x)^2 + (-3.5 + y)^2)) (-3 + x) - 9. E^(-9 ((-2.5 + x)^2 + (-1.5 + y)^2)) (-2.5 + x) - ...


0

To satisfy your requirements, it is necessary for the spacing between streamlines to be inversely proportional to the vector field strength, but unfortunately Mathematica only allows us to specify a constant spacing for a streamline plot. As an ugly workaround we could try rendering lots of plots with different constant spacings and combine them according to ...



Top 50 recent answers are included