Mathematical vectors, operations on vectors and vectorized programming.

learn more… | top users | synonyms

2
votes
1answer
178 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
433 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
299 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
416 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
123 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
1answer
236 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
466 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
248 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
643 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
66 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
114 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
315 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
276 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
109 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
333 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
226 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
1answer
61 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
2answers
64 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
124 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
126 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
63 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
77 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
241 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
130 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
128 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
92 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
1answer
50 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
82 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
147 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
46 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... ...
1
vote
0answers
55 views

vector/list containing matrices as elements dot product [closed]

mA = {{a11, a12}, {a21, a22}}; mB = {{b11, b12}, {b21, b22}}; mC = {{c11, c12}, {c21, c22}}; mD = {{d11, d12}, {d21, d22}}; v={{mA},{mB}}; w={{mC},{mD}}; What I ...
1
vote
0answers
40 views

ListVectorPlot3D invalid dataset [duplicate]

I have generated a dataset which seems to fine according to the help page of Mathematica for a ListVectorPlot3D but, it says it is not a valid set. I have given the data set below, could someone ...
1
vote
0answers
30 views

X-axis obscuring a vector that lies along it [duplicate]

I am having the following problem. I am playing with Manipulate and I would like to draw a vector overlapping an axis (x-component of a vector), and I would like ...
1
vote
0answers
88 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
1answer
296 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.
0
votes
2answers
197 views

Apply a function to a matrix of vectors [closed]

I have a matrix containing on each position a pair of numbers $(a,b)$. I would like to compute the norm of each vector $(a,b)$ and keep the result in form of a matrix. So basically, I need to apply ...
0
votes
2answers
42 views

Multiply value if it includes a period

I download data from an online source, now I have a problem: the source code doesn't allow to differ between values of 10 (which actually stands for 10) and 10.000 (which is 10'000, but Mathematica ...
0
votes
2answers
401 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.
0
votes
1answer
557 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: ...
0
votes
1answer
76 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 ...
0
votes
1answer
100 views

replace is not happening for specific vector valued expression

Given x[t_] := {Subscript[x, 1][t], Subscript[x, 2][t]} following replace works fine x[t] /. x[t] -> 0 0 but following ...
0
votes
1answer
121 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
172 views

Symbolic matrix simplification and solving

I am trying to expand or solve an equation that contains matrices for a certain matrix, but it is not working: ...
0
votes
1answer
105 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?
0
votes
2answers
181 views

Plotting problem

I was wondering why I keep receiving the error message "Derivative should be a triple of numbers, or scaled form" from the following code ...
0
votes
1answer
221 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 ...
0
votes
1answer
142 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
2answers
57 views
0
votes
1answer
57 views

Visualizing vectors [closed]

How to visualize a set of vectors with 3 coordinates $(x,y,z)$, e.g.,$(1,1,1), (1,-1,-1),(-1,1,-1),(-1,-1,1)$? In fact there are many of them. I try the function "Graphic3D" with the following code ...
0
votes
1answer
60 views

Curvature Manipulation: Vector Evaluation Error [closed]

I am building a mathematical simulation of curvature that will show the Osculation circle at each point on a curve. However my code keeps coming up with errors and ...