Tagged Questions

Mathematical vectors, operations on vectors and vectorized programming.

learn more… | top users | synonyms

0
votes
1answer
135 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 ...
0
votes
1answer
324 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.
1
vote
1answer
159 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 ...
7
votes
2answers
2k 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 ...
1
vote
0answers
89 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 ...
0
votes
0answers
32 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 ...
2
votes
1answer
255 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 ...
3
votes
3answers
271 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 ...
3
votes
1answer
617 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 ...
4
votes
1answer
913 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 : ...
3
votes
1answer
204 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 ...
3
votes
3answers
336 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 ...
7
votes
5answers
1k 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?
0
votes
1answer
594 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: ...
3
votes
4answers
163 views

Pack Solve results into a vector

I am currently using a really easy function to get the eigenvectors of a corresponding eigenspace: ...
1
vote
2answers
231 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 ...
2
votes
1answer
180 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 ...
1
vote
3answers
705 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 ...
12
votes
1answer
1k 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 ...
2
votes
3answers
314 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 ...
6
votes
2answers
922 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 ...
3
votes
1answer
116 views

Center of quadrangular

Having 4 points A (ax, ay), B (bx, by), C (cx, cy) and D ...
12
votes
4answers
424 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 ...
11
votes
4answers
2k 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: ...
7
votes
2answers
646 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 ...
28
votes
2answers
1k 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 ...
14
votes
6answers
2k 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 ...
4
votes
1answer
295 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 ...
3
votes
2answers
861 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 ...
14
votes
2answers
2k 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) ...