The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [vector]

Mathematical vectors, operations on vectors and vectorized programming.

450 questions
Filter by
Sorted by
Tagged with
23 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: ...
27 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: ...
56 views

How I can plot Vector3DPlot?

I want to reproduce the vector 3D plots as shown in the figure. It's in spherical polar coordinates (i.e. vector 3D plot on plane). The angle [Theta] is spherical coordinate is determined by the ...
39 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 ...
143 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.
38 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 ...
39 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.: ...
67 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 ...
41 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 ...
79 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.$$
85 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)? ...
71 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?...
34 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: ...
34 views

Matrix Vector multiplication [duplicate]

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 ...
51 views

How to get results in terms of vector operations?

Is there a simple way to simplify an expression in terms of vector operations? For example, when I evaluate this; ...
40 views

Functional Opacity in VectorPlot3D

I am trying to plot a vector graph such that that vectors closest to the origin are opaque, and those furthest from the origin are transparent. I have tried using opacity with a function inside of it: ...
107 views

Flow over the circle

I'm trying to plot a vector field over a circle, Particularly the vector field in this plot: ...
19 views

177 views

Solving Laplace equation in spherical coordinates

I was trying to solve Laplace's equation for a spherical capacitor, which is not difficult by hand, just to figure out the commands so I can eventually try something more complicated. Then, I ran into ...
77 views

Curl in Polar Coordinates

I was trying to figure out Curl in other coordinates. The Curl documentation (https://reference.wolfram.com/language/ref/Curl.html ) didn't really say how Mathematica interpreted the input. Anyway, I ...
148 views

134 views

Multivariate series for approximating implicit system

I'm trying to approximate the solution of an implicit set of equations by means of a Taylor series. I have managed to do so for a solution expressed in terms of a single independent variable, by using ...
68 views

Normalize a vector: error [duplicate]

I have this simple example in which I am trying to write a column vector (ket vector) and then I want to normalize it. It seems that ther is something wrong, leading to an error message "The first ...
18 views

Multiplication of Two Vectors Not working correctly [duplicate]

I am trying to simply multiply a 1x2 vector by its transpose however Mathematica is not performing this action correctly. When I change to 2x2 matrices the multiplication works correctly however. My ...
77 views

How can I calculate the time-series of a vector?

I need to calculate a time-series of the vector $\|\theta(t)\|=2.2^{-t}\|v(t)\|$ where $t$ for 10 time-steps. I was thinking of expressing the vector as a list of functions, and then the functions ...
116 views

Why can't Nsolve find the solutions for my equations?

I have a problem using NSolve in my Mathematica code. In my Code NSolve should find a value for qw, but it won't. The strange ...
84 views

Find n-roots of unity and put them in vector [closed]

Assume you want to find all roots of n-unity and then you want to put them in a vector. I tried to find all the roots of unity this way: Solve(z^n==1,z) But now ...
640 views

Can we turn this for loop into a more elegant Mathematica code?

I am coding stuff manipulating indirection arrays and I have some code like: ...
56 views

Why am I getting results containing Re and Conjugate?

Using the matrix Ham4LVLReg1, I am trying to get four vectors. Initially, I got the eigenvectors, and then, I computed the eigenvectors ...
84 views

Joining $4 \times 1$ vectors defined through functions to form a $4 \times n$ matrix

I define a $4x1$column vector through a variable as: Z[i_]:=List[{a[i]},{b[i]},{c[i]},{d[i]}] I then want to make a $4\times n$ matrix by joining a specified ...
253 views

What's wrong with this cross product of two vectors? [closed]

x = {{a},{b},{c}}; y = {{d},{e},{f}}; Cross[x,y] Whe trying to evaluate this expression, I get the error ...
92 views

Verifying equality $(\vec a \times \vec b)^2 = \left| \vec a \times \vec b \right| ^2$

I'm trying to verify the equality $(\vec a \times \vec b)^2 = \left| \vec a \times \vec b \right| ^2$ in Mathematica. How can I do it? Thank you for your time.
350 views

Plotting Vectors in Mathematica

I'm trying to plot 2D vectors in Mathematica. Built in functions don't really work for me because I want to plot vectors of matrices from the origin to the their coordinates with an arrow on their ...
I am trying to create animations of a time dependent vector field $\vec v(t,x,y)$. The problem is that VectorPlot scales the vectors for each time $t$ separately ...