Mathematical vectors, operations on vectors and vectorized programming.

learn more… | top users | synonyms

2
votes
2answers
104 views

How to initialize several elements per iteration with Table?

I would like to initialize this kind of vector : {0,0,1,1,0,1,0,1,1,1,1,1} with Table. I tried ...
-1
votes
1answer
49 views

Problem with cross product of two columns [closed]

I am trying to perform a cross product of two "Columns" which I expect to give me a column too: Cross[{{a}, {b}, {c}}, {{x}, {y}, {z}}] but it gave me an error: Cross::nonn1: The arguments ...
6
votes
2answers
68 views

Complex result for Real vectors in VectorAngle

I was expecting a real angle using VectorAngle when passing real valued vectors, however I obtained a complex angle. ...
0
votes
0answers
6 views

Term For Rotating 3d Vectors About a Pivot Point [migrated]

What is the term for Rotating a 3d Vector about another 3d Vector (Pivot Point)? For example; if I want to move X distance from one point towards another point - the mathematical term for this ...
1
vote
1answer
62 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 ...
6
votes
3answers
190 views

A Case of DeleteCases for WeatherData

I am trying to use ListVectorPlot in combination with WeatherData and CountryData to show ...
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 ...
5
votes
6answers
649 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)$. ...
-1
votes
1answer
108 views

Finding the maximum of a gradient vector

Im trying to find the maximum of my gradient vector G[x,y], I've tried several options including FindMaximumValue, FindMaximum etc. but i couldn't find it. The full function is shown below, any help ...
0
votes
0answers
32 views

Get rid of external library dependency

I am trying to generate C code for some functions, which I do not post in full because they are a few hundred lines long. The functions do nothing too fancy: a bunch of dot products, powers and roots. ...
5
votes
3answers
415 views

How to find the magnitude of a vector?

I'm doing this exercise in Wagner's book (p.78) , and this is my attempt: ...
3
votes
2answers
114 views

Is it possible to specify the direction of rotation in VectorAngle function?

If I use the function VectorAngle[{1,0},{1,-1}], is it possible to obtain the angle generated by rotating around the axis counter clock wise? In other words, I would move from the first vector to the ...
1
vote
2answers
113 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 ...
2
votes
1answer
71 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 ...
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: ...
6
votes
2answers
442 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 ...
3
votes
3answers
124 views

how can I make a control for my vector equation in my simulation?

I'm trying to build a control selector or menu for equations to put into my curvature simulations. However all the code I've tried hasn't worked.Does anyone know how I could make a control selector or ...
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 ...
1
vote
0answers
44 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
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
81 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 ...
0
votes
1answer
86 views

Select positive value from a vector

I am wondering how to pick out the positive Omega value from soln, and make these positive values into a row vector. I know how ...
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 ...
0
votes
1answer
53 views

Plotting multiple vector fields with different domains in a single graph

I have attached a scheme of the problem. Essentially what I need is to plot 2 different vector fields in a single graph with different domains. The underlying physical problem is to model electric ...
1
vote
0answers
53 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 ...
2
votes
1answer
76 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 ...
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 ...
2
votes
2answers
435 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 ...
0
votes
1answer
141 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
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 ...
0
votes
1answer
84 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
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 ...
5
votes
0answers
198 views

Estimation of vector autoregressive (VAR) process

To estimate 1-dimensional VAR process (which is AR process) you can easily use functions EstimatedProcess or ...
0
votes
0answers
30 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
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 ...
0
votes
0answers
85 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
72 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
244 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 ...
11
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 ...
18
votes
7answers
814 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 ...
0
votes
0answers
36 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
51 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
170 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: ...
7
votes
2answers
234 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
99 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
2k 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
104 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
175 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) ...