Questions tagged [vector]

Mathematical vectors, operations on vectors and vectorized programming.

Filter by
Sorted by
Tagged with
2
votes
2answers
47 views

Tensor contraction

How do I let mathematica compute a tensor contraction like $\delta_{ab}\delta_{bc}$ with an output $\delta_{ac}$ efficiently? I tried TensorContract and TensorReduce but they were not helpful. ...
1
vote
1answer
53 views

Finding a Numerical Solution to a Linear Combination Inequality

Can I use Mathematica to find a value for $\alpha$ that satisfies the below linear combination inequality? If so, how? $$ \begin{bmatrix} -1 \\ -1 \\ -1 \end{bmatrix} < \begin{bmatrix} g_1 \\ \...
1
vote
1answer
41 views

How to calculate this Cross product [closed]

I was trying to calculate this Cross product Cross[{a, b}, {c, d + e}] Mathematica gives the following result ...
5
votes
2answers
171 views

3D Vectors wrap on the Sphere

How I can wrap the 3D vectors around the sphere surface like this one. My angles are ...
0
votes
0answers
47 views

How to plot a series of arrows from a list of vectors?

Suppose I had a list of 3-vectors as a time series like the following: ...
6
votes
1answer
105 views

Mathematica slow at estimating vector autoregressive model parameters

I have been trying to obtain VAR model parameters using EstimatedProcess and FindProcessParameters. It seems to take a very long time as soon as I have more than 6 or 7 time series and lag length >2. ...
0
votes
1answer
42 views

StreamPlot is giving correct answer while VectorPlot gives wrong answer

I'm trying to plot this vector <1,3*y^(2/3)> using vector plot. but it gives me a wrong answer. ...
0
votes
0answers
28 views

Vector into or out of the plane Symbol

How do I add the symbol for vector into or out of the plane, at a given point, using graphics? Source: https://commons.wikimedia.org/wiki/File:Notation_for_vectors_in_or_out_of_a_plane.svg
2
votes
0answers
85 views

Converting complex equations to matrix form

My question is a continuation of the topic: How to convert equation to vector (matrix) form? It is necessary to separate the components of equations into vectors and matrices and a combination of ...
3
votes
1answer
52 views

Evaluate $\int_{0}^1 \frac{\sin\|a v\|}{\|a v\|} a \mathrm{d}a$ as $\frac{1-\cos(\|v\|)}{\|v\|^2}$

Is it possible to have Mathematica evaluate the following integral? $$I=\int_{0}^1 \dfrac{\sin\|a v\|}{\|a v\|} a \mathrm{d}a$$ where $v$ is a vector. By hand: since $a\in[0,1]$ and with $\mu=\|a ...
0
votes
1answer
33 views

Defining a vector with variables (as if it were a function)

I would like to define a vector with variables that can be inputed later. For instance, I would want to define some vector v = {v1, v2}, use it in some operations and then, much later, tell it what ...
2
votes
1answer
62 views

separation of variables in case of vector components

I have a function f in two variables y and theta, where y=z^2+x^2. There are numerical values for x,z,and theta ( x and z are the dimensions),I have to do calculations to obtain the velocity, so I ...
0
votes
2answers
53 views

Select a number in a list

here is my question. I have a range of parameters spanning in a given range, a={1,50},b={100,200} and c={300,500}. For every set of parameters I have an indexed vector like this (for a given set): <...
0
votes
0answers
50 views

How to simplify an expression with implicit vector functions and cross product operation?

1.The pattern is set in order to calculate the integral of a derivate of a function (to return original function, first fundamental theorem of calculus) ...
1
vote
0answers
56 views

Minimal and maximal angular separation of two spheres as viewed from surface of third sphere

Short version: find the values of theta and phi that make overlapValue (defined below) maximal and the values of theta and phi that make it minimal, given that all other values are constants and ...
2
votes
2answers
121 views

Implementation of the Wilson-Theta Method

Edited version I (am a beginner) try to solve a problem in which I have to use some vectors that have specific values for each time step. I thought it would be interesting to define something similar ...
1
vote
1answer
50 views

Using Grad and NDSolve with vector variables

A simple orbital model might be developed like this: ...
2
votes
1answer
140 views

How can I use a unit vector notation found in physic texts?

In physics (I'm thinking of Taylor's Classical Mechanics or Griffith's Classical Electrodynamics) it is common to use "hat" vectors to denote unit vectors like $\hat{x}$ or $\hat{r}$. If I wanted to ...
1
vote
1answer
56 views

How to use Collect in Mathematica [closed]

For an input $n$, I have $n^2$ variables uu[1,1],...uu[1,n],...,[n,1],...,uu[n,n]. I have an equation that is linear in these (e.g. ...
1
vote
1answer
33 views

Collect terms according to elements of a vector

I have a vector u, with elements u[1],u[2],...u[n]. I then have an expression with terms that are linear in u[1],u[2],...u[n]. How can I collect these terms and group them as coefficients of u[1],u[...
0
votes
0answers
29 views

Error in variable trying to perform SlicedVectorPlot

I have been trying to plot the normal vector over the Mobius Strip, which I know I cannot do asking it to be a well-defined continuous map, nevertheless you can do it in a small region, which I am ...
1
vote
0answers
44 views

Vector Color function usage

Can anyone explain why there is a difference between following plots: ...
2
votes
1answer
52 views

How to get an equation to take in a list of points

I am trying to solve and plot a vector which is equal to (xi,yi)+gradientf(xi,yi). I solve for the gradient by finding the derivative. I am struggling with how to write/get the function to take in my ...
0
votes
1answer
45 views

How can I take the divergence of a symbolic vector? [duplicate]

I would like to compute expressions that have the following form: $$\left(\partial_{p_1} - \partial_{p_2}\right)^2 \left(\partial_{p_1} - \partial_{p_2}\right)^2 \frac{(p_1-p_2)\cdot(p_3-p_4)}{p_1^...
0
votes
1answer
49 views

Calling a function with a vector doesn't work for me

I'm trying to create a simple function that generates a transformation matrix from the partial derivatives of two coordinate systems. It currently works when I have it written like this: ...
5
votes
2answers
211 views

Plotting single vectors in parametric plots

I am trying to plot something like the Frenet-Serret Formulas using a parametric plot, like this: ...
0
votes
0answers
48 views

How to plot a 3D function and an arrow pointing in the direction of the gradient vector?

I need to plot a 3D function and show an arrow pointing from the curve into the direction of the gradient vector. I also need to plot a ContourPlot of the level surfaces of the function, also with an ...
0
votes
0answers
24 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: ...
0
votes
1answer
35 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: ...
0
votes
0answers
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 ...
1
vote
2answers
159 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.
0
votes
1answer
49 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 ...
1
vote
0answers
41 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.: ...
2
votes
1answer
80 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 ...
7
votes
0answers
42 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 ...
2
votes
2answers
82 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.$$
2
votes
1answer
113 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)? ...
2
votes
1answer
94 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?...
0
votes
1answer
35 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: ...
0
votes
0answers
37 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 ...
1
vote
0answers
54 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; ...
2
votes
1answer
48 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: ...
2
votes
2answers
116 views

Flow over the circle

I'm trying to plot a vector field over a circle, Particularly the vector field in this plot: ...
0
votes
0answers
20 views

Parametrized vector function in PDE with DSolve/NDSolve

I'm trying to solve a PDE for a parameterized function $\vec x(s, t)$ where $t \in [0, T]$ and $s \in [0, T/h]$. This PDE reads as: $\frac{\partial \vec x}{\partial t} = \vec u (s, t)$, $ \vec x (s,...
3
votes
2answers
115 views

Plot vectors as sums of vectors along the axes

in a phase diagram appear vectors that go in different directions. When graphing with the "streamplot" or "vectorplot" command, only the arrows appear showing how they move away from or closer to ...
0
votes
0answers
35 views

Generate vector field pointing to minimum intensity (black)

I have a black and white image and want to plot a vector field that points to the highest and nearest minimum intensity value (something like the arrows shown in the image). Similar to Gradient filter ...
2
votes
1answer
140 views

Outer (dyadic) product between vectors of the same index in two lists

I have two lists of vectors and I want to take the outer product between elements in the lists of the same index. Using either Outer or TensorProduct works for e.g. the first two indices: ...
3
votes
1answer
67 views

One-hot vectors encoding with NetEncoder

I have a text and vocabulary (text has two "the" entries): ...
0
votes
0answers
73 views

DSolve help - List encountered within

I'm reading through a physics paper (it's for the displacement of skyrmions in a 2D lattice) and just wanted a little help in visualizing an equation that is shown: $$0=\mu \nabla^2\vec{u}+(\lambda +\...
0
votes
2answers
32 views

Piecewise vector

I need to have a vector with the length of 15000. The first 4000 elements have value 12, the next 3000 elements, that is 4001 to 7000 be 0 and the rest of it to the last be 5. I have written it with ...

1 2 3 4 5 10