# Tagged Questions

Mathematical vectors, operations on vectors and vectorized programming.

1k 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 ...
389 views

### Extract common factor from vector or matrix

I can't believe this hasn't been asked before but I can't find anything. Is there a way to convince Simplify or FullSimplify to ...
98 views

### Compile issues, scoping and order of evaluation

I have a few questions about compiling functions, which I think are all related to scoping and order of evaluation. I will illustrate them by a minimal example of the problem I have. I'm sorry for ...
25 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 ...
72 views

### Controlling scaling of multiple vector fields in VectorPlot3D

I'm trying to plot the electric and magnetic fields of a relativistically moving electric charge using VectorPlot3D, and apply "Manipulate" to change the velocity. The code I'm using is as follows: ...
61 views

### StreamPlot in 3 Dimensions

I would like to plot the vector equation $\left( {\begin{array}{*{20}{c}} {\frac{{ - a + \sqrt {{a^2} + 4bc} }}{c}}\\ {\frac{{ - a - \sqrt {{a^2} + 4bc} }}{c}}\\ 1 \end{array}} \right)$ as a stream ...
356 views

### Solving Symbolically Equations with Vectors and Matrices

I want to solve equations with vector variables and vector/matrix parameters symbolically. As a basic example I would like to be able to solve something like $[I-aG]x=b$ where $a,b \in \mathbb{R}^l$ ...
118 views

### Ray tracing: Insufficient precision

I am writing a ray tracer to find the intersection point between a single ray and a cylinder. ...
153 views

### Manahalobis distance between two vectors

I want to calculate the Mahalanobis distance between two vectors that represent two points. For example: ...
94 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 ...
44 views

### Color vectors according to a user-defined function

V[x_,z_]:=x/Sqrt[x^2+z^2]; Ex[x_,z_]=-D[V[x,z],x]; Ez[x_,z_]=-D[V[x,z],z]; The electric field components (Ex,Ez) are to be plotted as a vector field in the x-z ...
43 views

### Plotting a parameterized vector in the x-y plane

I am trying to plot the trajectory of a parachutist descending at a constant vertical rate of 8 m/s while a south wind also blows at a rate of 8 m/s. He initially jumps from a height of 300 m. I am ...
47 views

...
22 views

### PolynomialGCD in complex numbers for vector simplification

I wanted to define a function $f(t,\vec{r})=e^{i\omega t-i\vec{k}\cdot\vec{r}}$, and take gradient of it. With, ...
53 views

54 views

### Get rid of external library dependency

I am trying to generate C code for some functions, which I do not post in full because they are a few hundred lines long. The functions do nothing too fancy: a bunch of dot products, powers and roots. ...