Mathematical vectors, operations on vectors and vectorized programming.

learn more… | top users | synonyms

1
vote
1answer
56 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 ...
0
votes
1answer
80 views

Vector-calculus [duplicate]

I have a table of 200 elements, elements are '0', '1', '2'. I have participate them into groups for 20 elements each one. Then I have calculate how many '0', '1', '2' are in each part. And then in ...
1
vote
1answer
45 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 ...
0
votes
1answer
56 views

Extract random points from a 3D manifold [closed]

Could anyone help me with this problem? I have a 3D manifold given by $$1<d<b<c,\;\;b+d<c,\;\;b+2d>c.$$ My goal is to find a lot of points belong to it.
0
votes
0answers
28 views

Is it possible to obtain vector differentiation results in terms of vectors rather than components? [duplicate]

When doing certain operations on vectors in Mathematica it is quite desirable to convert the results back into coordinate-free notation. Unfortunately, after going through the Documentation Center and ...
1
vote
2answers
48 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 ...
0
votes
0answers
80 views

Visualizing 3D vector field on surface of sphere [duplicate]

I want to vizualize (quite complicated) 3D vector field which has both real and imaginary part and is expressed in spherical coordinates. I was thinking about expressing the field for certain r and ...
0
votes
1answer
45 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
2answers
167 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 ...
0
votes
0answers
33 views

Using Manipulate, how do you display the points on the curve and the tangent vector? [duplicate]

I'm new to Mathematica and my assignment is very vague... I'm hoping someone can explain to me a bit more of that this quesion means: Given the curve C, display the point on the curve and the ...
0
votes
1answer
41 views

Function output of two lists are only diagonal elements

I'm having a little crysis over here. What I basically want to do is some sort of 3D-Plot, but I'm only interested in the resulting values. I have two vectors x and p: ...
0
votes
1answer
109 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: ...
5
votes
0answers
96 views

Estimation of vector autoregressive (VAR) process

To estimate 1-dimensional VAR process (which is AR process) you can easily use functions EstimatedProcess or ...
7
votes
2answers
207 views

How to make a point's position time-dependent given a formula for the next step?

I've made a program that is just some points on a plane. Red points are cops and green points are robbers. Each point has a vector indicating where it is going to be in the next step of $t$. Right now ...
0
votes
0answers
82 views

Gradient from Vectors type

I'm working with Vectors type in Mathematica 9. For this purpose I use the following command: ...
4
votes
2answers
419 views

How to combine two vectors into a matrix by columns?

I know it may sounds idiot, but I've been looking through the document, and couldn't find a way to combine two vectors say {a, b} and ...
0
votes
1answer
86 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?
2
votes
1answer
115 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) ...
0
votes
1answer
82 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 ...
1
vote
2answers
57 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 ...
4
votes
1answer
116 views

Orthogonalizing without normalizing

Is there a way to make Orthogonalize do the normal Gram-Schmidt procedure without normalizing the result? As far as I've understood this was possible with ...
2
votes
1answer
164 views

Plotting a Gravity-Field [duplicate]

I try to plot a 2D gravity field or something similar in the form like $r/|r|^3$ with the standart builtin VectorPlot function: ...
0
votes
1answer
269 views

Circular Orbit Velocity in Vector Components

I'm trying to find out how to calculate the initial velocity needed to keep a spacecraft in a circular orbit around the Earth given its initial position and an initial angle theta in a Cartesian ...
4
votes
2answers
252 views

Plotting: Is anyone familiar with gradientfieldplot command?

I am trying to plot this graph showing the electric field lines and lines of equipotential based off the electrode configuration(in black) of two parallel lines. This is what I've been using for other ...
0
votes
2answers
147 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
194 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
2answers
340 views

How to input a 3-vector in spherical coordinates?

I would like to input a 3-vectors in spherical coordinates $(r, \theta, \phi)$ and be able to operate on such vectors (dot and cross product) with the results being given in the same spherical ...
1
vote
3answers
421 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. ...
4
votes
2answers
143 views

Assumptions for RotationMatrix

I'm making C++ program, and in my program I need a rotation matrix around any vector. I wanted to extract RotationMatrix[fi,{x,y,z}] output and put it in my ...
2
votes
0answers
349 views

computation of gradient vector field in 3D using GradientOrientationFilter

I want to compute a 3D gradient vector field of an Image3D object using the built-in GradientOrientationFilter function in Mathematica. From the documentation I ...
0
votes
2answers
146 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
1answer
93 views

Setting Variables Inside VectorPlot3D [closed]

I was trying to plot a vectorfield of a gravitational field. I was wondering if there's any way you can set $R = \sqrt{(x-3)^2+(y-3)^2+(z-3)^2}$ Inside the command: VectorPlot3D[{-((x - 3)/R), -(y ...
3
votes
5answers
304 views

How to generalize and speed up this program?

There is a vector whose length is $n*m$, we can part it into $n$ sections in order. I want to define a function to compare the $i$-th and $i+1$-th section and find the minimum. The program for $n=m=3$ ...
2
votes
2answers
259 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}. ...
18
votes
7answers
799 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
213 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
126 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
100 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 ...
1
vote
2answers
292 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
109 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
306 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
440 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
1answer
122 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 ...
4
votes
2answers
317 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
244 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
85 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 ...
7
votes
2answers
258 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
257 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
260 views

NDSolve with vector function

(Possible duplicate yet I still can't understand.) Basic 2D revolving around origin: ...
5
votes
4answers
520 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)$. ...