# Questions tagged [vector]

Mathematical vectors, operations on vectors and vectorized programming.

71 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
52 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 ...
2k views

I want to compute a 3D gradient vector field of an Image3D object using the built-in GradientOrientationFilter function in Mathematica. From the documentation I ...
303 views

80 views

### Simplifying results of a vector function to be nested (SECOND UPDATE)

(Oddly enough, the title for another question that ended up dealing with an unrelated problem could have worked better here, but I didn't want to plagiarize.) Given a symbolic vector function ...
125 views

### Plot vectors read in from file

From a file, I read in vectors and their origins. I construct a table from this which I want to plot in 3 dimensions. However, the ListVectorPlot3D only shows an ...
95 views

### plot a (r,phi) vector in 3D

I have a vector, with its 3 components function just of the position in the x,y plane (as r, phi): ...
569 views

### Symbolic derivatives with vectors and matrices

I'm currently trying to solve some problems using symbolic vectors and matrices of arbitrary size. However, I have some problems with understanding and verifying the results: I defined the vectors as ...
125 views

### Performance tuning with memoisation, compilation and vectorization - further possibilities?

In order to tune the performance of noticeably slow code of mine, I had a look at many different excellent posts on this topic here on M.SE, e.g. here to name the most interesting one. Now I ask ...
136 views

### Orthonormal Preserves Angle Between Vectors

Consider: U = {{4/5, 3/5}, {3/5, -4/5}}; u1 = {1, 3}; u2 = {-1, 3}; VectorAngle[u1, u2] VectorAngle[U.u1, U.u2] Which produces this output: ArcCos[4/5] ArcCos[4/...
54 views

### Simplify expression?

Suppose I have expressions that involve terms like: p1.p1+p2.p2+p3.p3+p4.p4 p1, p2, p3, and p4 are all elements of an array: ...
263 views

### Piecewise in 2D with quadrants as conditions

I am trying to define a piecewise vector field. Can the condition be of the form I am using (i.e. a quadrant)? I can't also make Piecewise work with more than two ...
199 views

### Ray tracing: Insufficient precision

I am writing a ray tracer to find the intersection point between a single ray and a cylinder. ...
113 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 ...
54 views

### piecewise vector field and composition of piecewise functions

I have the following vector field ...
33 views

### velocity four-vector definition by xAct

I want to define the velocity vector by the following relation and evaluate the norm of the vector by using the Minkowski metric. I have defined the tensor x (position tensor) in xAct, but I don't ...
55 views

### Is it possible to generate a random vector space in Mathematica?

The idea is that I’d like to try to use Mathematica to work through proofs. So if a proof says, “Let there be a vector space V…”, I would like to see a concrete representation of that vector space in ...
31 views

### How To Define Indexed Vectors

I have to define two 2-D vectors to be multiplied by a matrix and multiplied by several Clebsch-Gordan coefficients. Below are my definitions and my attempt at computing the sum. ...
30 views

### Looking for a starting point to solve a PDE with vector-coefficients

I am looking for a good source for Mathematica in order to solve a PDE with vector coefficients. I have found this: https://reference.wolfram.com/language/FEMDocumentation/tutorial/SolvingPDEwithFEM....