Mathematical vectors, operations on vectors and vectorized programming.
2
votes
2answers
77 views
Ploting a 3D vector field using Manipulate, VectorPlot3D and NDSolve
My aim is to plot a vector field of the following system with a few trajectories:
$$r'(t)=i-l.r(t)-\text{ux}. r(t). x(t)-\text{uy}. r(t). y(t) \\ x'(t)=\text{ex}. \text{ux}. r(t). x(t)-\text{mx}. ...
14
votes
5answers
605 views
Make a huge vector in a wise way
I need to construct a vector similar to:
v[x_]:={0, 0, x, 0, 0, 2*x, 0, 0, 3*x, ....., 0, 0, n*x};
where n=10^9. How can I ...
1
vote
4answers
117 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
49 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:
...
0
votes
0answers
47 views
Simplify function with normalized vector
I made a very simple case:
testF[x_, y_, z_] = x^2 + y^2 + z^2
Simplify[testF[x, y, z]]
If {x, y, z} is normalized, the simplified result should just be 1. How ...
0
votes
0answers
46 views
How can I convert a quaternion ( of Quaternion package ) to a vector? [duplicate]
Consider Quaternion[1,2,3,4].
<< Quaternions`
Quaternion[1, 2, 3, 4]
Is there a built-in function which would convert ...
1
vote
2answers
128 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
1answer
78 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 ...
2
votes
1answer
129 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 ...
3
votes
1answer
130 views
Normal and Tangent of Acceleration in 3D
I need to figure out how to find the Normal and Tangent of acceleration. I know the formula for the tangent of acceleration is $((Acceleration . Velocity)/(Velocity.Velocity))*Velocity$ and the normal ...
1
vote
0answers
69 views
How can I keep Mathematica from interpolating extra field lines?
I have a fortran code that creates tables of vectors. One for the y-axis, one for the z-axis. The MMA code then takes these points, creates a point-by-point data list, flattens the resulting array, ...
1
vote
1answer
93 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 ...
3
votes
2answers
111 views
Animated Vector plot
I'm trying to make an animation of a time-varying 2D vector field. However, I'm got a difficulty in that Mathematica normalises the length of the vectors with each call to ...
1
vote
1answer
122 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
1answer
63 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 ...
6
votes
2answers
147 views
How to declare a 3D vector variable?
How can I do vector calculations without telling Mathematica the vector entries?
I have very many arbitrary linear combinations in $\mathbb{R}^3$ which I want to perform some general calculations on ...
1
vote
2answers
207 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. ...
2
votes
1answer
115 views
NDSolve with vector function
(Possible duplicate yet I still can't understand.)
Basic 2D revolving around origin:
...
4
votes
4answers
260 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)$.
...
6
votes
1answer
184 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 ...
1
vote
1answer
68 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
...
0
votes
0answers
69 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 ...
2
votes
2answers
183 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 ...
0
votes
2answers
172 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.
6
votes
2answers
150 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 ...
3
votes
2answers
265 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 ...
3
votes
4answers
103 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 ...
2
votes
1answer
66 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
3answers
279 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 ...
0
votes
1answer
59 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
151 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
112 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
476 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
78 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
26 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
166 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
161 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
283 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 ...
2
votes
1answer
459 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
168 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
184 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 ...
4
votes
5answers
514 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?
2
votes
0answers
169 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 ...
2
votes
0answers
161 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 ...
1
vote
1answer
331 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
129 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
188 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
135 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
351 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 ...
10
votes
0answers
645 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 ...