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
51 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
77 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
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 ...
6
votes
3answers
193 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 ...
-1
votes
1answer
110 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
33 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. ...
8
votes
3answers
470 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
115 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
74 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 ...
0
votes
2answers
57 views
1
vote
1answer
110 views

Placing many arrowheads on curves

I can't find anything anywhere on the web to help me with this. My plot: ...
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
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... ...
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 ...
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 ...
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
55 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
58 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 ...
0
votes
1answer
87 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 ...
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 ...
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 ...
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
77 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
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 ...
0
votes
0answers
37 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
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: ...
5
votes
0answers
206 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
236 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
100 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
106 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
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) ...
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 ...
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 ...
4
votes
1answer
150 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
216 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: ...
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 ...
5
votes
2answers
300 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 ...