Questions tagged [vector]

Mathematical vectors, operations on vectors and vectorized programming.

Filter by
Sorted by
Tagged with
0
votes
1answer
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 ...
1
vote
1answer
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$ ...
1
vote
3answers
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? ...
1
vote
0answers
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 ...
1
vote
0answers
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 ...
4
votes
1answer
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. ...
1
vote
2answers
72 views

Repeat every $ x $ coordinate except the last one

Below is the code to print the x value. ...
2
votes
1answer
43 views

Plotting list data of cross product of field vectors

...
2
votes
2answers
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 ...
0
votes
2answers
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 ...
0
votes
0answers
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: ...
1
vote
0answers
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 ...
1
vote
2answers
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: ...
0
votes
1answer
46 views

Searching for elegant way manipulate complex vectors

I have some complex vectors that I would like to normalize and further manipulate. For example, one is this: ${\qquad \rm vec}=(-\frac{-a + b + \sqrt{a^2 - 2 a b + b^2 + 4 c^2 + 4 d^2}}{2 (c + i d)},1)...
1
vote
1answer
50 views

Plot a sum of vectors using inline free format or wolframalpha. What is the hidden code?

Using Wolframalpha or inline free format you can obtain a nice representation of a sum of vectors. An example is shown below. Whish is the hidden code? (or a code that make the same representation). ...
0
votes
2answers
33 views

Multiplication of certain terms in a sum within a vector

Is there any way to multiply certain terms within a vector with a constant? e.g. assume that I start with a vector {f[4] - g[-1] , h[2] , 2 * g[2] + h[-1]} where f[ i ], g[ i ], h[ i ] are functions ...
0
votes
1answer
57 views

Turn vector equation into matrix multiplication

I have physical equations of motion that describe the dependence of one vector field on the components of another vector field. Without getting too much into detail, my differential equations involve ...
0
votes
1answer
110 views

Plotting Vector Fields for the Basis Vectors of Different Coordinate Systems

In short, I am hoping to plot out vector fields for the basis vectors of my elliptic cylindrical coordinate system. For more information on the coordinate system I mentioned, Wolfram|Alpha has a site ...
0
votes
0answers
58 views

On using VectorPlot

I am using VectorPlot to show direction fields for 1st-order differential equations. I basically learned to do this by example (from Wolfram Documentation and ...
2
votes
1answer
50 views

Vector color function varying upon vector direction

I have the following code: ...
0
votes
1answer
42 views

How to imitate the operation law of vector

Given that $(a \times b) \cdot c=2$, now I need to find the value of $[(a+b) \times(b+c)] \cdot(c+a)$. ...
3
votes
2answers
244 views

How do we plot magnitude-angle vector in Mathematica?

I am lost on how to plot this fairly simple vector with a magnitude and an angle in Mathematica. Any help would be appreciated. Thanks in advance. e.g. 20 @ 50 Degree Angle
0
votes
1answer
34 views

Why is a simple vector list inside Row not rendering in MatrixForm when passed in as an argument to a user defined function?

I stripped down a function makeRuleRow down to its bare essentials (of irrelevant descriptions) to understand why my vector list ...
0
votes
0answers
45 views

How to join the lhs and rhs of the rows of a matrix equation and solve for one of the variables?

The matrix equation m.{x,y}==b results in an awkward disjointed looking presentation but correct construction of a system of linear equations ...
1
vote
1answer
53 views

Import OVF 2.0 Vector field files

I'm using a simulation software (mumax3) which outputs OVF_2.0 files. It can either export binary or text files. The binary files are usually much smaller than the text files. I would like to use the ...
0
votes
0answers
49 views

Ket representation in mathematica

I have a simple case: I tried using ket representation for vectors in $\mathbb{C}^{2^2}$. I tired assing for Ket[] notatation from mathematica like this Ket[3] = $\{0,0,0,1\} $. We can assign it in a ...
3
votes
1answer
54 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
60 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
45 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
63 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
53 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
69 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
95 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
68 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
135 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
80 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
56 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
283 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
98 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
154 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
65 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
52 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
123 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
57 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
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 ...
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
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): <...
1
vote
0answers
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 ...
2
votes
2answers
137 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 ...
2
votes
1answer
59 views

Using Grad and NDSolve with vector variables

A simple orbital model might be developed like this: ...

1
2 3 4 5
11