# Tagged Questions

Mathematical vectors, operations on vectors and vectorized programming.

140 views

### How to fix the number and length of vectors when using ListVectorPLot

I want to plot only the vectors that I specify in my list of vectors, and no more. ListVectorPlot plots many of them, namely plots the field extrapolating from my four vectors.I would also like to ...
1k views

### How to declare a 3D vector variable?

How can I do vector calculations without telling Mathematica the vector entries? I have very many arbitrary linear combinations in $\mathbb{R}^3$ which I want to perform some general calculations on (...
345 views

### Doing vector manipulations on Mathematica

This is hopefully a simpler version of this previous unanswered question of mine. Let me just focus on the two expressions $F_2^{(s)}$ and $F_3^{(s)}$ given in A.3 and A.4 of page 19 of this paper. ...
788 views

### NDSolve with vector function

(Possible duplicate yet I still can't understand.) Basic 2D revolving around origin: ...
2k views

### Visualizing vector spherical harmonics

I have painstakingly derived the vector-spherical harmonics $\mathbf{V}_{J,\,M}^\ell(\theta, \phi)$, which are the generalization of ordinary spherical harmonics $Y_\ell^m(\theta, \phi)$ to vector ...
1k views

### A matrix-vector cross product

I want to do a cross product involving a vector of Pauli matrices $\vec \sigma = \left( {{\sigma _1},{\sigma _2},{\sigma _3}} \right)$; for example, $\vec \sigma \times \left( {1,2,3} \right)$. <...
2k views

### Smoothing/Averaging 2D Vector Fields

I have a list of 2D vectors defined by {{x,y},{u,v}} and would like to smooth or average the vectors. For example here are 2 vector fields, the second has noise ...
196 views

### Splitting list of sums into a sum of lists

I want to split a list of sums into a sum of lists For example, I'd like to turn {{x + y + z}, {x}, {y}, {z}} into ...
844 views

### How to expand a general expression in cross and dot product in Mathematica

I am looking for a way to simply the general expression in cross product and dot product with general vectors. I got a help in How do I simplify a vector expression? but soon I find that it doesn't ...
2k views

### How to plot vector function r(t) = i + j + t*k

How can I plot the vector function $r(t) = i + j + t\;k$, where i, j, k are unit vectors, and t is the parameter of the function r.
187 views

### Reduce data by taking averages

I am trying to implement the following: I have got two vectors x and y of unequal lengths. The length of ...
1k views

### Plot 2D Vector function in 3D

I want to plot a 2D vector function such as $F(x,y) = (a(x,y),\,b(x,y))$ in a 3D graph so that the vectors are embedded in the xy plane. I tried to do the following: First I defined a piecewise ...
160 views

### Differentiating with respect to vectors of unspecified length

Given a function defined by f[x_,y_] := Sum[ x[[i]] (g[y[[i]]] - g[Total[y]] - Log[x[[i]]]), {i, 1, Length[x]}] I can easily calculate the derivative for a fixed ...
2k views

### Phase space vector field [duplicate]

I have a system of non linear equations and from NDSolve I get the solution. I plot the phase space with ...
298 views

### How can I impose a condition on Solve or FullSimplify?

I would like to define a real 3-D vector as, say, v = {x, y, z}, but I want it to have a fixed norm and not necessarily a unit norm. I would like to impose this ...
514 views

### How to define a fixed length vector in Mathematica?

I would like to define a 3-D vector as say v={x,y,z}, but I want it to have a fixed norm, say a unit norm |v|=1. How do I impose this condition on v.
179 views

### Need assistance with plotting Cell Center Points and Normals (ListPlot, ListVectorPlot)

This is the CellCenter datapoints and associated Normals data: http://wikisend.com/download/458974/CellCenters-and-Normals.dat The dat file contains data points for x,y coordinates and x,y ...
5k views

### How do I simplify a vector expression?

I am doing vector analysis. I have figured out that the following expression won't be simplified in Mathematica: Simplify[Dot[x, y] - Dot[y, x]] I think the ...
95 views

### Solving for vector elements in a function to which the vectors are not passed explicitly

I want to define a function which takes in two integers (indicating the lengths of 2 vectors), and solves a simple set of expressions at a set of points to find all the values in both the vectors. so ...
39 views

### How to define a vector of arbitary length [duplicate]

I need to use a vector of length which I can change, indexed symbolically So for e.g. when N=3 I'd like to have vec={c1,c2,c3} when N=5 ...
3k views

### Is it possible to do vector calculus in Mathematica?

I am trying to rearrange and manipulate some vector differential equations in Mathematica. As far as I understand you have to tell Mathematica that a variable is a vector by specifying the components ...
400 views

### Directional derivative of SiegelTheta

I'm working on a problem where I have to integrate both the Mathematica function SiegelTheta and some of its second order directional derivatives. Using the function works well but something goes ...
361 views

### Multiply (not divide!) Vectors in a List by Their Own Norm

I wanted a set ("list") of 100 random vectors of dimension 2. I accomplished this already by generating a "list of lists" where the elements of the overall list are 2-dimensional lists consisting of 2 ...
1k views

### Plotting a complicated vector field

If we consider the vector $\left ( A \cdot \nabla \right) \: B$, we have in Cartesian coordinates \left ( A \cdot \nabla \right) \: B = \left ( A \cdot \nabla B_x \right ) e_x + \left ( A \cdot \...
2k views

### Visualize eigenvectors at specified points?

I am very new to Mathematica and I got stuck about visualizing eigenvectors 2D and 3D. I want to visualize my largest eigenvector field of tensor data(15x15). I wrote this code for instance : ...
234 views

### How can I independently move vector components (in 2D)?

Here's what may well be a simple problem that I have been having difficulty with: There are two connected vectors, v1 and v2, such that: v1 begins at the origin and and ends at point a1 v2 begins ...
593 views

### How to pull scalars out of a function that should act on lists?

Suppose I have A = a vecA B = b vecB where a and b are supposed to be arbitrary scalars ...
2k views

### Vectors with a certain magnitude in Mathematica

For a user-specified magnitude, is there a way to have Mathematica produce any 3D vector with that magnitude?
807 views

### Plot 3D vector that is a function of one variable

I have a function, r[t], which is a piecewise function that generates a 3D vector. It looks like this: ...
193 views

### Pack Solve results into a vector

I am currently using a really easy function to get the eigenvectors of a corresponding eigenspace: ...
274 views

### Symbolically associate vectors and their norms

I am wondering how to handle the following situation: I do have vectors of known dimension that I would like to handle symbolically. I suppose I can do something like ...
222 views

### Orthogonalize method, keeping to binary vectors

The built in function: Orthogonalize[m] where m is a list of vectors returns a orthogonal basis for m. However, I want to stick to the binary field. However, I ...
1k views

### Span of a set of vectors over a given field

Could anyone help me find a function that takes as inputs: a set $S$ of vectors and an integer $q$ and outputs: the Span of $S$, where $Span[S]$ is a vector space over the field $F_q$. If its ...
2k views

### Persistence length of a polymer chain

I'm trying to calculate the persistence length (Lp)Â of a polymer chain using Mathematica. The first and simplest method is to compare the EuclideanDistance between ...
441 views

### Force VectorPlot3D to show One arrow

I am plotting a curl, and I only want VectorPlot3D to show one arrow, I have tried adjusting VectorPoints-> 1, but the plot show's no arrows at all. Is 2 the minimum VectorPoints I can have? If I ...
2k views

### Plotting a path in a vector field

I am trying to make a visual representation of the curve $y=x^{2}$, with $x\in\left[0,1\right]$ in the vector field defined by $\vec{F}=\left[-y,x\right]$. However, as far as I can tell there does ...
149 views

Having 4 points A (ax, ay), B (bx, by), C (cx, cy) and D ...
648 views

### Decomposing a matrix with polynomial elements into a polynomial with matrix coefficients

Let's say I have a matrix, $\mathbf{M}$, that is polynomially dependent on a single variable, such as M = {{15 + a^2, a + 5 a^2}, {a - 5 a^2, 2}} and I want to ...