# Tagged Questions

Mathematical vectors, operations on vectors and vectorized programming.

30 views

### Graphics3D plot of group of Vectors

I am trying to overlap 2 different Coordinate Systems (C1,C2). I want it to be visually pleasing but it is increasing the length of code I tried ...
33 views

### Plotting topological defects with VectorPlot

I have been trying to create a table with the graphs of the lowest winding number topological defects that can appear in a nematic Liquid Crystal. That is what I have been able to do so far: ...
19 views

### How to resolve this issue related to Conjugate?

When I perform the vector multiplication given below FullSimplify[{a,b}.Conjugate[{a,b}]] I am getting the result as I expect ...
35 views

### How to find vertice by two angles and side? [migrated]

I know 'alpha', 'betta', length 'c', vertices: 'A' and 'B' How can i find the 'C'?
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?
50 views

### Doing vector calculus with element-wise defined formulas and arbitrary-sized vectors [duplicate]

Currently I am trying to make Mathematica handle vector expressions defined element-wise. For example, But I can find no way to do this. Every way I tried requires a fixed-sized vector and returns ...
69 views

### Coloring data in Mathematica

I am trying to put color gradient on my data, or want values above some number to appear red and green below that number. For my situation the number is 5.14*10^(-13). I have X, Y, and Z axis data, ...
154 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: <...
213 views

### Is it possible to specify the direction of rotation in VectorAngle function?

If I use the function VectorAngle[{1,0},{1,-1}], is it possible to obtain the angle generated by rotating around the axis counter clock wise? In other words, I would move from the first vector to the ...
99 views

54 views

### Plotting a vector function composed of piecewise scalar functions

I am relatively new to Mathematica, and am having difficulty doing something that is conceptually very simple. I am trying to plot a vector field in which the vector function is composed of piecewise ...
223 views

### Plotting a complicated 3D wave on the surface of a sphere [duplicate]

Suppose you have a vectorial wave described by a complicated function of time and cartesian coordinates $t$, $x$, $y$ $z$ (very simple example below) : ...
66 views

### NDSolve and a vector function [duplicate]

I'm trying to solve a set of differential equations which include a numerical function that takes a vector and returns a vector. ...
198 views

### How to define a set of two random orthogonal unit vectors?

I need to define a random set of two orthogonal unit vectors. The code below doesn't give proper unit and orthogonal vectors : ...
177 views

### Plotting a 3D vector field on 2D plane

I want to visualize vector field that is of the form $(v_1(x,y), v_2(x,y), v_3(x,y))$, i.e. there is a three component vector that depends on only two coordinates $x$ and $y$ in the real plane. There ...
41 views

### How to pack arguments of a function into a vector for brevity? [closed]

I have a function like the following one: F[a_, b_, c_, d_] := Product[f[x, y, z, j, i], {j, a, b}, {i, c, d}] where ...
57 views

### Integrating a gradient and matching terms automatically

I am trying to integrate a function $\nabla w(x,y)$ indefinitely knowing both components of $\nabla w(x,y)$. I have a function dw[x_,y_] that I have defined. I then ...
30 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: ...
157 views

### Errors Solving Elliptic PDES with FEM

I am trying to solve the equation below governing transversely isotropic plane strain in cartesian coordinates with the given boundary conditions based on code found here using Mathematica 10.1 on OSX ...
73 views

### How to a convert a 2D vector into an angle [closed]

How do you calculate the angle between the line from the origin to a point $(x,y)$ and the horizontal axis?
92 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 ...
73 views

### Cross product of three vectors

I am following the answer of Jens from following post: How do I simplify a vector expression? vec /: Cross[vec[x_], HoldPattern[Cross[y__]]] := I want to create ...
137 views

### Draw Vectors in Spherical Shell and then Animate

I want to draw three vectors inside a spherical shell. One of the vectors will be moving, the others will be stationary. However, the animation is the next step. For now, I would like to get the ...
410 views

### Factor vector out of a matrix

I am wondering how to factor a[1],a[2],...,a[4] out of sim so that I can write sim as the ...
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 ...
201 views

### Plotting Phase Space [duplicate]

I have these two Equations \begin{align} x'(t)&=\sin(y)\\ y'(t)&=\cos(x) \end{align} and I'm trying to plot the phase space(plane) for this system... I've tryed Equationtrekker but can't ...
249 views

### Plot a vector field over a line

This seemingly simple problem is giving me some trouble. I need to plot a vector field on a line, and for that I'm following what I found here. I try to create a mesh that contains two points and just ...
66 views

### Given vector of function plot each of them separately? [closed]

At the moment, I am trying to plot a vector of functions which consists of the change along $x$, $y$, and $z$. Is it possible in Mathematica to give a vector of functions and plot them separately ...
55 views

### How to avoid 0 OverVector[F] to be evaluated as 0?

I am fairly new in Mathematica and I am trying to work with scalars and vectors. I decided to denote vectors using OverVector (as example, ...
81 views

### How to adjust vector scaling with a specific aspect ratio

I'm trying to create a vector plot with uniform vector scaling. I need the x and y ranges to be very different, because I need to highlight the angle between the vectors and the y=0 axis. This means ...
144 views

### How to obtain the gradient of a function as a function?

The Grad function allows me to get the gradient of a function like this: ...
206 views

### ListPlot vector 3D circle line

I got a 2D vector with the following code. ...
45 views

### Unevaluated derivatives of known functions after replacement

I want to make the following replacement work correctly: Array[(2 D[xM[[#1]][t], t] * D[xM[[#2]][t], t]) &, {3, 3}] /. {xM -> {Sin[ω t], Cos[ω t], 0}} ...
72 views

### A problem about matrix/vector extension via $\tt ArrayPad$

Given that I have a vector and matrix as follow: vec = Array[Subscript["P", #] &, 6, 0]; mat = Array[Subscript["P", #1, #2] &, {5, 4}, {0, 0}]; And I ...
44 views

### Order of evaluation for numeric functions

I'm trying to plot a 3D vector field to illustrate an electric field of a uniformly charged disk, and I used Manipulate to change the radius R of the disk to see ...
41 views

### 2D vector treatment and visualisation

I'm just trying to define a set of vectors, in the Cartesian plane, draw the vectors originating from the origin $O,$ and be able to add vectors and draw the resulting vector. I've started doing ...
203 views

### Complex result for Real vectors in VectorAngle

I was expecting a real angle using VectorAngle when passing real valued vectors, but I obtained a complex angle: ...
I would like to calculate following type of contraction: $$P_{ij}^{p-k} P_{lm}^{k} ((p_l - k_l) \delta_{ij} + k_j \delta_{il}) (k_n \delta_{im} - p_m\delta_{in}) = ?$$ where p,k are d-...