Questions tagged [vector]

Mathematical vectors, operations on vectors and vectorized programming.

Filter by
Sorted by
Tagged with
0
votes
0answers
35 views

Solving integral involving absolute value of a vector

I am trying to integrate the following in mathematica: $\int_0^r \frac{exp(-k_d(|\vec{r}-\vec{r_j}|+|\vec{r}-\vec{r_i}|)}{|\vec{r}-\vec{r_j}|\times|\vec{r}-\vec{r_i}|}r^2dr$. I have first defined, the ...
3
votes
1answer
39 views

How to represent a data list by arrows?

I have a code that builds a plot with 7 functions and mark 4 points. Each level of list data describes a function (see below). The curves are created from the "data" input from ...
1
vote
0answers
52 views

LeviCivitaTensor contraction indices

My computer has problems when I try to perform a calculation with TensorContract. In particular, with the second answer to my previous question Contracting indices ...
1
vote
1answer
34 views

Referencing the Component of a vector

If I were to define a vector r = {2, 0} + t*({5, 4} - {2, 0}) >>{2 + 3 t, 4 t} Sqrt[(D[r[1]])^2 + (D[r[2]])^2] How do I properly reference a single ...
0
votes
0answers
46 views

Plotting a vector path on a torus

I am looking to visually represent some properties of vectors when plotted on the plane versus when the are plotted on the torus. Plotting them on the plan is relatively straight forward, however I ...
1
vote
1answer
49 views

ContourPlot does not show correct ratio of two functions

I am using ContourPlot to compare the norm of the two vector fields, $||\boldsymbol{f}||/||\boldsymbol{g}||$, which should be contour on $(x,y)$ plane. Consider ...
0
votes
1answer
36 views

Getting blank output in VectorPlot3D

I am trying to do a vector plot of a given vector field for which I wrote following code ...
1
vote
0answers
91 views

How to use Mathematica to find the coordinates of 7 points?

Could anyone please help me with using Mathematica to find the coordinates of 7 equally spaced points on the unit sphere $S^3$ in $\mathbb{R}^4$? Thanks a lot!
4
votes
0answers
56 views

Indicate Unit Vectors in Solve

I'm solving a system defined by two rays. The rays originate from two points {x,y,z} and {x,y,z-h}. They go in directions (unit ...
2
votes
2answers
89 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
65 views

Finding a Numerical Solution to a Linear Combination Inequality [closed]

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
47 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
200 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
58 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
141 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
57 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
32 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
3
votes
0answers
100 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
54 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
34 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
63 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
57 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
55 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
58 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
125 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
55 views

Using Grad and NDSolve with vector variables

A simple orbital model might be developed like this: ...
3
votes
1answer
183 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
63 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
42 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
35 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
49 views

Vector Color function usage

Can anyone explain why there is a difference between following plots: ...
2
votes
1answer
55 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
49 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
51 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
311 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
72 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
26 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
45 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
43 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
178 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
52 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
106 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
47 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
83 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
127 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
113 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
42 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
39 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
56 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; ...

1
2 3 4 5
10