# Tagged Questions

Mathematical vectors, operations on vectors and vectorized programming.

1answer
54 views

### Doing vector manipulations on Mathematica

This is hopefully a simpler version of this previous unanswered question of mine. Let me just focus on the two expressions $F_2^{(s)}$ and $F_3^{(s)}$ given in A.3 and A.4 of page 19 of this paper. ...
1answer
51 views

### NDSolve with vector function

(Possible duplicate yet I still can't understand.) Basic 2D revolving around origin: ...
0answers
5 views

### Finding Vectors in cartesian form [migrated]

I am stuck on this question could you please help me. Find,in Cartesian form, the equations of the straight line through the point with position vector (-1,2,-3) parallel to the direction given by ...
2answers
139 views

### A matrix-vector cross product

I want to do a cross product involving a vector of Pauli matrices $\vec \sigma = \left( {{\sigma _1},{\sigma _2},{\sigma _3}} \right)$; for example, $\vec \sigma \times \left( {1,2,3} \right)$. ...
1answer
112 views

### Smoothing/Averaging 2D Vector Fields

I have a list of 2D vectors defined by {{x,y},{u,v}} and would like to smooth or average the vectors. For example here are 2 vector fields, the second has noise ...
1answer
56 views

### Splitting list of sums into a sum of lists

I want to split a list of sums into a sum of lists For example, I'd like to turn {{x + y + z}, {x}, {y}, {z}} into ...
0answers
49 views

### Any way to fully expand an expression of two operators?

I am looking for a way to expand a complicate expression like the follow (A o B + C o (DxE))*(D o (ExF) - ExA + A) Here o and x are the operator. I want to ...
2answers
145 views

### How to expand a general expression in cross and dot product in Mathematica

I am looking for a way to simply the general expression in cross product and dot product with general vectors. I got a help in How do I simplify a vector expression? but soon I find that it doesn't ...
2answers
148 views

### How to plot vector function r(t) = i + j + t*k

How can I plot the vector function $r(t) = i + j + t\;k$, where i, j, k are unit vectors, and t is the parameter of the function r.
2answers
146 views

### Reduce data by taking averages

I am trying to implement the following: I have got two vectors x and y of unequal lengths. The length of ...
2answers
205 views

### Plot 2D Vector function in 3D

I want to plot a 2D vector function such as $F(x,y) = (a(x,y),\,b(x,y))$ in a 3D graph so that the vectors are embedded in the xy plane. I tried to do the following: First I defined a piecewise ...
4answers
90 views

### What is the inverse of CoefficientList?

I have numbers in vector notation. I need to get polynomial notation from them. My numbers are {0, 1, 23, 5, 15, 0, 0, 0}. I want to get x + 23x^2 + 5x^3 + 15x^4 ...
1answer
55 views

### Differentiating with respect to vectors of unspecified length

Given a function defined by f[x_,y_] := Sum[ x[[i]] (g[y[[i]]] - g[Total[y]] - Log[x[[i]]]), {i, 1, Length[x]}] I can easily calculate the derivative for a fixed ...
3answers
179 views

### Phase space vector field [duplicate]

I have a system of non linear equations and from NDSolve I get the solution. I plot the phase space with ...
1answer
49 views

### How can I impose a condition on Solve or FullSimplify?

I would like to define a real 3-D vector as, say, v = {x, y, z}, but I want it to have a fixed norm and not necessarily a unit norm. I would like to impose this ...
1answer
124 views

### How to define a fixed length vector in Mathematica?

I would like to define a 3-D vector as say v={x,y,z}, but I want it to have a fixed norm, say a unit norm |v|=1. How do I impose this condition on v.
1answer
100 views

### Need assistance with plotting Cell Center Points and Normals (ListPlot, ListVectorPlot)

This is the CellCenter datapoints and associated Normals data: http://wikisend.com/download/458974/CellCenters-and-Normals.dat The dat file contains data points for x,y coordinates and x,y ...
2answers
285 views

### How do I simplify a vector expression?

I am doing vector analysis. I have figured out that the following expression won't be simplified in Mathematica: Simplify[Dot[x, y] - Dot[y, x]] I think the ...
0answers
70 views

### Solving for vector elements in a function to which the vectors are not passed explicitly

I want to define a function which takes in two integers (indicating the lengths of 2 vectors), and solves a simple set of expressions at a set of points to find all the values in both the vectors. so ...
0answers
25 views

### How to define a vector of arbitary length [duplicate]

I need to use a vector of length which I can change, indexed symbolically So for e.g. when N=3 I'd like to have vec={c1,c2,c3} when N=5 ...
1answer
149 views

### Directional derivative of SiegelTheta

I'm working on a problem where I have to integrate both the Mathematica function SiegelTheta and some of its second order directional derivatives. Using the function works well but something goes ...
0answers
152 views

### Plot a vector field, illustrating its continuity [closed]

I am trying to plot a Magnetic Field inside and outside of an accelerating tube. While the solution is correct, when I try to plot I can't see the continuity on the edge of the cylinder. My code is ...
3answers
142 views

### Multiply (not divide!) Vectors in a List by Their Own Norm

I wanted a set ("list") of 100 random vectors of dimension 2. I accomplished this already by generating a "list of lists" where the elements of the overall list are 2-dimensional lists consisting of 2 ...
1answer
235 views

### Plotting a complicated vector field

If we consider the vector $\left ( A \cdot \nabla \right) \: B$, we have in Cartesian coordinates \left ( A \cdot \nabla \right) \: B = \left ( A \cdot \nabla B_x \right ) e_x + \left ( A \cdot ...
1answer
423 views

### Visualize eigenvectors at specified points?

I am very new to Mathematica and I got stuck about visualizing eigenvectors 2D and 3D. I want to visualize my largest eigenvector field of tensor data(15x15). I wrote this code for instance : ...
1answer
147 views

### How can I independently move vector components (in 2D)?

Here's what may well be a simple problem that I have been having difficulty with: There are two connected vectors, v1 and v2, such that: v1 begins at the origin and and ends at point a1 v2 begins ...
3answers
165 views

### How to pull scalars out of a function that should act on lists?

Suppose I have A = a vecA B = b vecB where a and b are supposed to be arbitrary scalars ...
5answers
440 views

### Vectors with a certain magnitude in Mathematica

For a user specified magnitude, is there a way to have Mathematica produce any 3D vector that fits that magnitude?
0answers
151 views

### VectorPlot scaling problems

When I plot a uniform field with zero values everywhere with the following command: VectorPlot[{y - y, x - x}, {x, -3, 3}, {y, -3, 3}] the result are horizontal ...
0answers
147 views

### How to plot function & integral with vector variable?

I want to plot functions & integrals with vector variable the present in this paper. For example the equation (5) at p. 3: I want to plot a chart like figure 5, i.e. the $x$-axis is the angle ...
1answer
302 views

### Plot 3D vector that is a function of one variable

I have a function, r[t], which is a piecewise function that generates a 3D vector. It looks like this: ...
4answers
120 views

### Pack Solve results into a vector

I am currently using a really easy function to get the eigenvectors of a corresponding eigenspace: ...
2answers
177 views

### Symbolically associate vectors and their norms

I am wondering how to handle the following situation: I do have vectors of known dimension that I would like to handle symbolically. I suppose I can do something like ...
1answer
126 views

### Orthogonalize method, keeping to binary vectors

The built in function: Orthogonalize[m] where m is a list of vectors returns a orthogonal basis for m. However, I want to stick to the binary field. However, I ...
3answers
299 views

### Span of a set of vectors over a given field

Could anyone help me find a function that takes as inputs: a set $S$ of vectors and an integer $q$ and outputs: the Span of $S$, where $Span[S]$ is a vector space over the field $F_q$. If its ...
0answers
559 views

### Persistence length of a polymer chain

I'm trying to calculate the persistence length (Lp) of a polymer chain using Mathematica. The first and simplest method is to compare the EuclideanDistance between ...
3answers
180 views

### Force VectorPlot3D to show One arrow

I am plotting a curl, and I only want VectorPlot3D to show one arrow, I have tried adjusting VectorPoints-> 1, but the plot show's no arrows at all. Is 2 the minimum VectorPoints I can have? If I ...
2answers
418 views

### Plotting a path in a vector field

I am trying to make a visual representation of the curve $y=x^{2}$, with $x\in\left[0,1\right]$ in the vector field defined by $\vec{F}=\left[-y,x\right]$. However, as far as I can tell there does ...
1answer
102 views

### Center of quadrangular

Having 4 points A (ax, ay), B (bx, by), C (cx, cy) and D ...
4answers
305 views

### How do you decompose a polynomial matrix into its matrix coefficients?

Let's say I have a matrix, $\mathbf{M}$, that is polynomially dependent on a single variable, such as M = {{15 + a^2, a + 5 a^2}, {a - 5 a^2, 2}} and I want to ...
4answers
693 views

### What is the cleanest way to prevent divide-by-zero warnings?

If I evaluate {1, 2, 3, 4}/{5, 6, 0, 8}, obviously I get one warning: ...
2answers
398 views

### Integration with vector coefficients

I asked this same question in Mathematics, and it was suggested I might try here. I'm more comfortable with Maple, but if I can get Mathematica to do what I'm after, so much the better. Basically ...
2answers
838 views

### Animating a Voronoi Diagram

edit: Excellent answers have been provided and I made an animation which is suitable for my use, however, all the examples rely on bitmap/rasterized data; is there a vector based approach? I would ...
6answers
878 views

### Why can't I define vector v as having subscripted elements v_1, v_2, v_3…?

I'm a very beginner in Mathematica 8 programming. While trying to play a little with tensor analysis I encountered a problem. How to define for example vector in such manner: v={$v_1,v_2,v_3$} For ...
1answer
229 views

### How to fix errors in Gram-Schmidt process when using random vectors?

I first make a function to get a random vector on unit sphere in a swath around the equator. That is what the parameter $\gamma$ controls; if $\gamma = 1/2$, the vectors can be chosen anywhere on the ...
2answers
569 views

### creating vectors with normal distribution of lengths

First consider vectors of unit length, say on the unit sphere. Now I want to give some magnitude to these vectors and I want the magnitude to be chosen from the normal distribution. In one dimension ...
2answers
742 views

### How to represent and manipulate abstract indexed vector (or tensor) expressions?

I have a couple abstract indexed quantities, both differential elements $dx = dx^\mu e_\mu + x^\mu de_\mu$ $du = du^\mu e_\mu + u^\mu de_\mu$ I can compute the expression \$(dx + du) \cdot (dx + du) ...
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 23, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9118571877479553, "perplexity_flag": "middle"}