Mathematical vectors, operations on vectors and vectorized programming.

learn more… | top users | synonyms

2
votes
1answer
389 views

NDSolve with vector function

(Possible duplicate yet I still can't understand.) Basic 2D revolving around origin: ...
2
votes
3answers
1k 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 ...
2
votes
1answer
121 views

Solving vector equations

I made this very simple module to try and solve vector X: ...
2
votes
2answers
114 views

How can I visualize an array of very small vectors spaced on very large grid? [duplicate]

I have data in the form points = {{1, 1, 1}, {1, 1, 2}, ...} vectors = {{2, 2, 5}, {2, 1, 7}, ...} Can somebody help to edit this data so I can ListVectorPlot a ...
2
votes
1answer
480 views

How to Normalise / Normalize eigenvectors? [closed]

I have a matrix and am trying to find the normalised eigenvectors of it. I am using the Eigensystem command and am getting a result. There is a normalize command, but as far as I can see this ...
2
votes
1answer
106 views

Taylor expansion of function of vectors—simplifying the output

I've got a real-valued function of several vectors $f(u,v,w)$ formed by taking scalar products of linear combinations of the vectors, I want to Taylor expand around small $v$ by writing $$f(u,\delta ...
2
votes
1answer
222 views

Plot Piecewise-Smooth Vector Field.

I want to plot a piecewise-smooth vector field. For instance: $F_1(x,y) = (x^2 + y^2, y^2)$, $F_2 (x,y) = (2xy,2xy-x^2)$ and $H(x,y) = x-y$ $F(x,y) = \begin{cases} F_1(x,y) \text{ if } H(x,y) ...
2
votes
2answers
506 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 ...
2
votes
3answers
324 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 ...
2
votes
1answer
34 views

How can I use parts of lists with Dynamic?

I'm a newbie - what am I doing wrong? I want to use parts of lists (vectors) in calculations but Mathematica will not evaluate anything that involves parts of lists that update dynamically. Is there a ...
2
votes
1answer
45 views

Sort a vector of vectors of vectors

Let's hope I'm calling it well, I have this vector, or matrix, now I really don't know what it is ...
2
votes
2answers
49 views

Returning the 3-dimensional vector from a skew symmetric matrix

I'm trying to write a function that takes in a skew symmetric matrix and returns the corresponding vector. When I write the following code, it works when I leave it as variables, but it does not work ...
2
votes
1answer
72 views

Changing the length of the vectors in vectorplot [duplicate]

I have the following code, and I've tried almost everything I can think of, even VectorColorFunction to describe magnitude. I am trying to make the length of the vectors proportional to r^{-2}, and ...
2
votes
1answer
493 views

Plot a 3D vector field from a file [duplicate]

I have a data file with six columns {x,y,z} and {ux,uy,uz} respectively, and I would like to plot the 3D vector field. http://www.mediafire.com/download/udoa61hu0m6itrc/campo.txt I'm trying to do ...
2
votes
1answer
127 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 ...
2
votes
0answers
81 views

Compile issues, scoping and order of evaluation

I have a few questions about compiling functions, which I think are all related to scoping and order of evaluation. I will illustrate them by a minimal example of the problem I have. I'm sorry for ...
2
votes
1answer
258 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 ...
1
vote
3answers
628 views

Adding a Sphere onto an existing 3D plot

I have a 3D plot. I need to add a small sphere marking the starting point, r[t] == 0. I'm pretty new at Mathematica and would greatly appreciate some help. ...
1
vote
2answers
351 views

Using the epsilon tensor in Mathematica

I'm having a great deal of trouble getting started on a weekly homework assignment in Mathematica. The assignment requires we use the epsilon tensor which is apparently built into Mathematica as ...
1
vote
3answers
731 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 ...
1
vote
2answers
76 views

Computing symbolic norm of a vector

Consider the code: n1 := Cos[α] Sin[β] n2 := Sin[α] Sin[β] n3 := Cos[β] n := {n1, n2, n3} Norm[n] Why the result is ...
1
vote
2answers
138 views

Selecting parts of a matrix via indices given by a vector

I have a column vector of the form $\{1, 1, 2, 3, 2, 3\}^t$ and an associated matrix that has the same number of rows as the column vector, $6$, and a number of columns that is equal to the maximum of ...
1
vote
2answers
348 views

Finding shortest non-zero vector $x$ satisfying $Ax=0 \pmod q$

Let $n$, $m$, and $q$ be positive integers (with $m > n$), and $A$ be a matrix over $\mathbb{Z}_q^{n \times m}$. Using Mathematica, I want to find the shortest non-zero vectors $x \in ...
1
vote
2answers
284 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. ...
1
vote
1answer
126 views

Placing many arrowheads on curves

I can't find anything anywhere on the web to help me with this. My plot: ...
1
vote
1answer
385 views

Making a ListVectorPlot3D from data in an external file

I have a .dat file with six columns: {x y z vx vy vz}, where x, y, z are space coordinates and vx, vy, vz are the vector components. How can I use this file to get ...
1
vote
2answers
236 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 ...
1
vote
3answers
45 views

`Solve` with variables as single vector

Say I have a set of equations where the unknown variables are the elements of a vector $c=(c_1,c_2,\ldots)$ and want to solve it for $c$. Is there a way to do this with ...
1
vote
1answer
64 views

Partitioning a list and gathering statistics on the distribution of values across partitions

I have a one-dimensional array of 200 elements consisting of the numbers 0, 1, 2. This array needs to be divided into 10 groups (20 items each). Then, for each group, I want to count how many of the ...
1
vote
1answer
133 views

Factor a Vector

Does there exist a function in Mathematica that simply takes out a common factor from a vector/list of expressions? This seems like such a simple operation that I am surprised that I could not find it ...
1
vote
1answer
140 views

Rotating a set of 3D points against an arbitrary axis

I want to rotate a list of 3D points around unit vector (1,0,1) by the angle of Pi. How can I accomplish it?
1
vote
2answers
70 views

How do I avoid vector variables being treated as scalars in the course of replacements?

I often work with a mixture of symbolic and concrete values as I develop teaching materials. I introduce variables symbolically and then need to instantiate them to specific values while continuing ...
1
vote
1answer
259 views

Simplify vector expression - is there something like “Factor” for vectors, dot products etc.?

I am looking for a way to simplify dot products etc. Here is a minimal example: Lets say I have two vectors a and b: Array[a,2] Array[b,2] Now I evaluate their ...
1
vote
1answer
133 views

Using Select on list of vectors [duplicate]

I have a dataset, where each element in the list is a vector as in data = Table[{i, 2 i, 3 i}, {i, 1, 10}] As an example, I am interested in the entries where ...
1
vote
1answer
140 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 ...
1
vote
1answer
117 views

Basis for the intersection of vector spaces

The MuPAD Notebook Interface provides the linalg::intBasis function: http://www.mathworks.com/help/symbolic/mupad_ref/linalg-intbasis.html How can I get the same ...
1
vote
1answer
66 views

Make 2D vector norm graph

I have: List of points on 2D plane: pointsz0 = ToExpression@Import@"http://pastebin.com/raw.php?i=VQfP0HgB"; And I have some values in those numbers: ...
1
vote
1answer
73 views

How can I transform a matrix to a vector (vectorization)? [closed]

How can I transform a matrix to a vector in mathematica? $A=\bigg{(}\begin{matrix} a_1 &a_2\\a_3&a_4 \end{matrix}\bigg{)} \longrightarrow |a>>=(\begin{matrix} a_1 ...
1
vote
1answer
87 views

Operator operation

There are two basic operators r={x,y,z} and p=-I*h*{D[#,x] , D[#,y], D[#,z]} &. The angular momentum operator is defined as ...
1
vote
4answers
277 views

converting between forms - symbols/subscripts - matrix products

If I have a vector of the form (xp+y, x+yp) do you have a simple way of creating the following matrix and vector from it: {{p, 1}, {1, p}} * {x, y}, such that ...
1
vote
1answer
133 views

Linear interpolation between defined anchorpoints in an array (where anchorpoints are set each time we see a new element)

This question is an update and a correction my earlier question: Linear interpolation of a list between periodic anchorpoints (which was nicely answered). Imagine I have a list of the form: ...
1
vote
1answer
130 views

Difference between vector's Dimensions

What's the difference between projection= Table[Conjugate[autoVett[[k]].someVector1], {k, 1, r}] Dimensions[projection] that gave me as results ...
1
vote
1answer
101 views

How to fix the number and length of vectors when using ListVectorPLot

I want to plot only the vectors that I specify in my list of vectors, and no more. ListVectorPlot plots many of them, namely plots the field extrapolating from my four vectors.I would also like to ...
1
vote
2answers
39 views

Exporting mixed data of matrices and vectors / lists

thank you for reading my question. I have a problem trying to export mixed data from Mathematica. I have different matrices and vectors, which should be combined to a output file. Here a ...
1
vote
1answer
88 views

how to find the vector intersection in a collection of triangulated 3D points?

I'm trying to calculate the 3D point coordinates for the intersection of a vector with a plane. I have been using the following code to do this: ...
1
vote
1answer
62 views

Simplification of linear algebra [duplicate]

I have a few vectors defined as V1 = Array[v1,3] V2 = Array[v2,3] V3 = Array[v3,3] And I am trying to solve a very simple equation along the lines of ...
1
vote
1answer
118 views

Show that three given vectors lie on a line, a plane, or span 3-space

Given three vectors, {2, 0, 0}, {0, 2, 2}, {2, 2, 3}, how could I see if they are all on the ...
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 ...
1
vote
0answers
66 views

Manahalobis distance between two vectors

I want to calculate the Mahalanobis distance between two vectors that represent two points. For example: ...
1
vote
0answers
67 views

Plotting Phase Space [duplicate]

I have these two Equ' $$x'[t]=Sin[y]$$ $$y'[t]=Cos[x]$$ and im trying to plot the phase space(plane) for this system... ive tryed Equationtrekker but cant seem to find the way to use it this way... ...