# Questions tagged [vector]

Mathematical vectors, operations on vectors and vectorized programming.

480 questions
Filter by
Sorted by
Tagged with
35 views

### Solving integral involving absolute value of a vector

I am trying to integrate the following in mathematica: $\int_0^r \frac{exp(-k_d(|\vec{r}-\vec{r_j}|+|\vec{r}-\vec{r_i}|)}{|\vec{r}-\vec{r_j}|\times|\vec{r}-\vec{r_i}|}r^2dr$. I have first defined, the ...
39 views

### How to represent a data list by arrows?

I have a code that builds a plot with 7 functions and mark 4 points. Each level of list data describes a function (see below). The curves are created from the "data" input from ...
52 views

### LeviCivitaTensor contraction indices

My computer has problems when I try to perform a calculation with TensorContract. In particular, with the second answer to my previous question Contracting indices ...
34 views

### Referencing the Component of a vector

If I were to define a vector r = {2, 0} + t*({5, 4} - {2, 0}) >>{2 + 3 t, 4 t} Sqrt[(D[r])^2 + (D[r])^2] How do I properly reference a single ...
46 views

### Plotting a vector path on a torus

I am looking to visually represent some properties of vectors when plotted on the plane versus when the are plotted on the torus. Plotting them on the plan is relatively straight forward, however I ...
49 views

### ContourPlot does not show correct ratio of two functions

I am using ContourPlot to compare the norm of the two vector fields, $||\boldsymbol{f}||/||\boldsymbol{g}||$, which should be contour on $(x,y)$ plane. Consider ...
36 views

### Getting blank output in VectorPlot3D

I am trying to do a vector plot of a given vector field for which I wrote following code ...
91 views

### How to use Mathematica to find the coordinates of 7 points?

Could anyone please help me with using Mathematica to find the coordinates of 7 equally spaced points on the unit sphere $S^3$ in $\mathbb{R}^4$? Thanks a lot!
56 views

### Indicate Unit Vectors in Solve

I'm solving a system defined by two rays. The rays originate from two points {x,y,z} and {x,y,z-h}. They go in directions (unit ...
89 views

### Tensor contraction

How do I let mathematica compute a tensor contraction like $\delta_{ab}\delta_{bc}$ with an output $\delta_{ac}$ efficiently? I tried TensorContract and TensorReduce but they were not helpful. ...
65 views

51 views

### Calling a function with a vector doesn't work for me

I'm trying to create a simple function that generates a transformation matrix from the partial derivatives of two coordinate systems. It currently works when I have it written like this: ...
311 views

### Plotting single vectors in parametric plots

I am trying to plot something like the Frenet-Serret Formulas using a parametric plot, like this: ...
72 views

### How to plot a 3D function and an arrow pointing in the direction of the gradient vector?

I need to plot a 3D function and show an arrow pointing from the curve into the direction of the gradient vector. I also need to plot a ContourPlot of the level surfaces of the function, also with an ...
26 views

### How to select multi vectors with particular condition

I have a matrix as: a01={{225., 1, 2, 3, 4}, {225.5, 2, 3, 4, 5}, {226., 3, 4, 5, 6}, {226.5, 4,5,6,7}} And I want to choose head: ...
45 views

### Independent scaling of arrowheads and vectors in vector plot

I'd like to scale with independent parameters the vectors and the corresponding arrowheads in a vector plot. The basic code is as follows: ...
43 views

### Vector field of point charges [duplicate]

I need help in plotting vector field or stream field. Can you please help me to plot electric field of these 13points standing on a circle which are all positive with same magnitude. The code for this ...
178 views

### Vector field of charges

I wanted to plot vector field of 12 positive charges Standing in a circular way with a positive charge at the center all same magnitude. I do not know how to start. Can you please help me Thanks.
52 views

### Convert input word into vector matrix

I wold like some help of converting an input (word or number or mix) into a single row vector, such as the following: If input is ">DAVID123<" I want it to be as {>,D,A,V,I,D,1,2,3,<} where ...
41 views

### VectorPlot interval as a union of intervals

What would you suggest me to do if I want to use VectorPlot in a certain region of a plane? e.g.: ...
106 views

### Including legend with reference magnitude in a VectorPlot

I'd like to plot a vector field with a legend for the magnitude of a reference vector. I have read all the document of VectorPlot and found only ...
47 views

### VectorPlot not localizing variables

Is this a bug or not? u = {{}}; VectorPlot[{1, u^2}, {u, 0, 1}, {z, 0, 0.4}] The VectorPlot works fine if ...
83 views

### How to generate vectors with programming

I want to generate all possible vectors programicaly with entrys in $\Bbb Z_4$: $$A_j:=\begin{bmatrix}x_1\\ x_2\end{bmatrix}, \qquad x_i\in \{0,1,2,3\}, j=1,2,\cdots 16.$$
127 views

### Vector field Stream?

The following graph shows the vector plot. How can I plot the solid lines which represents how the vectors are spatially varying and both on the same graph (vector plot and stream field)? ...
113 views

### Inconsistent Vector Plot over Contour Plot

I am trying to plot the gradient vector field over the contour plot of a function. While the demo function seems to work very well with the demo taken from How to use vector plot and gradient vectors?...
42 views

### Functions with Variable Numbers of Arguments: Outer Vector Product

I am trying to write a function that takes a column vector of variable dimension as an input and returns the outer product matrix as an output. What I have tried: ...
I have a rather simple question which surprisingly i could find the answer theres a matrix $U$ whith is $4*4$ and a vector $A$ which is $4*1$ and when I wand to multiply them by $U.A$ operator i get ...