# Questions tagged [vector]

Mathematical vectors, operations on vectors and vectorized programming.

502 questions
Filter by
Sorted by
Tagged with
45 views

### Vectors in 3D at Arbitrary Locations

I have a dataset of coordinates that describe the origins (x0, y0, z0) and the end-points (x1, y1, z1) of corresponding vectors. Each record is of the form {{x0, y0, z0, x1, y1, z1}...}. How are these ...
62 views

### Maximize a function over several variables [closed]

I want to maximize the function, $$S_{v}=\sum_{a \in\{1,-1\}^{n}}\left\|\sum_{i=1}^{n} a_{i} v_{i}\right\|$$ over $v_{i}$ and a given $n$ (say $n$=3). $v_i$ are unit vectors. $a$ are lists with $n$ ...
57 views

### How to get the squared norm of each vector from a Table? [closed]

This question is certainly very basic, but I don't get it! How can I make a table of all the squared norms from this table? ...
42 views

### How to write a program on gradients and the path for steepest ascent?

I'm given two functions f[x ,y ]=Cos[x]*Cos[y]/(6+x^2+y^2) and df[x ,y ]=Grad[F[x,y],{x,y}] I was given a note that ...
53 views

### How to use Solve[] properly to find an integer 3d vector solution to an equation with a condition?

I didn't use Mathematica for years and I am VERY rusty regarding the best way to solve this problem : 2*vectk.vectG = G^2, k = 2*pi/lambda I have the G vector and I want to find all vector k that can ...
40 views

### How can I let the length of a vector in VectorPlot be represented by it´s norm?

I would like to draw a vector field and let the magnitude of the vectors change over time (t) using the Manipulate function. The direction of the vectors will be static. ...
72 views

### Repeat every $x$ coordinate except the last one

Below is the code to print the x value. ...
43 views

...
131 views

### Using standard notation for vector magnitude

The mathematical notation for the magnitude of a vector is $\vert x \vert$, but this does not work: ∥ {1, 2, 3} ∥ Is there any way to overload the ...
64 views

### Vectorization of a function

I would like to calculate the exponential values of the elements of a list / vector. For example, I would like to calculate the Boltzmann distribution over different energy levels where the normalized ...
18 views

### How to write the resultant of NMinimaize as a vector?

I used NMinimize, and I get a result which after some modification is like: ...
34 views

### How do i sort a list of lists of vector pairs? [closed]

My problem is probably not so difficult but I could not find a solution myself. I am doing computations with 4 dimensional vectors, they represent the vertices of a polytope. So the order of the ...
162 views

### Plotting 3D data in (Fr, Fθ, Fz) cylindrical coordinates

I want to plot a skyrmion (like shown above) represented by a 3D vectorial arrows but showing in a 2D plane. My code is as follows: ...
46 views

37 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 ...
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 ...
59 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): <...
62 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 ...