Tagged Questions

Mathematical vectors, operations on vectors and vectorized programming.

learn more… | top users | synonyms

0
votes
0answers
35 views

Scalar multiplication [closed]

I define v = {a, b} I now want to scalar multiply the vector v by a scalar k. So I write kv The output I obtain is again ...
0
votes
2answers
73 views

Symbolic matrice or vectors in Mathematica?

Suppose I would like to define an expression, containing and array or matrix of symbolic elements. Like this ...
2
votes
1answer
43 views

Sort a vector of vectors of vectors

Let's hope I'm calling it well, I have this vector, or matrix, now I really don't know what it is ...
1
vote
2answers
39 views

Exporting mixed data of matrices and vectors / lists

thank you for reading my question. I have a problem trying to export mixed data from Mathematica. I have different matrices and vectors, which should be combined to a output file. Here a ...
1
vote
1answer
112 views

Basis for the intersection of vector spaces

The MuPAD Notebook Interface provides the linalg::intBasis function: http://www.mathworks.com/help/symbolic/mupad_ref/linalg-intbasis.html How can I get the same ...
2
votes
2answers
45 views

Returning the 3-dimensional vector from a skew symmetric matrix

I'm trying to write a function that takes in a skew symmetric matrix and returns the corresponding vector. When I write the following code, it works when I leave it as variables, but it does not work ...
1
vote
3answers
45 views

`Solve` with variables as single vector

Say I have a set of equations where the unknown variables are the elements of a vector $c=(c_1,c_2,\ldots)$ and want to solve it for $c$. Is there a way to do this with ...
3
votes
1answer
116 views

How to remove recursion, and write it functional and efficient way?

I wish to implement the following recursion efficiently. ...
1
vote
0answers
64 views

Manahalobis distance between two vectors

I want to calculate the Mahalanobis distance between two vectors that represent two points. For example: ...
3
votes
2answers
157 views

Simple Plot of Vector

I have a vector $<x(t),y(t),z(t)>$ constrained to a unit sphere. I am trying to plot what the vector looks like as time progresses. What would be the easiest approach to visualizing this? I ...
0
votes
1answer
40 views

Create vector for each vertex in a network [closed]

I have a network with x vertices and I would like to create a vector with random numbers for each vertex in this network. I would like to generate this list and represent it in a table. Further, it ...
2
votes
1answer
176 views

Plotting 3D Vector Field in one plane

I want to plot a vector field F={Fx, Fy, Fz}. However, I only want to plot it in one plane (say, z=0). When I use ...
2
votes
1answer
112 views

Solving vector equations

I made this very simple module to try and solve vector X: ...
3
votes
2answers
155 views

Orthogonal vector in two dimensions

Maybe this is really basic, but I couldn't figure it out. I would like to find the "hat vector" of a vector I defined: it's a vector orthogonal to the given one, assuming two dimensions. So for ...
2
votes
1answer
67 views

Changing the length of the vectors in vectorplot [duplicate]

I have the following code, and I've tried almost everything I can think of, even VectorColorFunction to describe magnitude. I am trying to make the length of the vectors proportional to r^{-2}, and ...
2
votes
0answers
80 views

Compile issues, scoping and order of evaluation

I have a few questions about compiling functions, which I think are all related to scoping and order of evaluation. I will illustrate them by a minimal example of the problem I have. I'm sorry for ...
1
vote
1answer
88 views

how to find the vector intersection in a collection of triangulated 3D points?

I'm trying to calculate the 3D point coordinates for the intersection of a vector with a plane. I have been using the following code to do this: ...
1
vote
1answer
64 views

Make 2D vector norm graph

I have: List of points on 2D plane: pointsz0 = ToExpression@Import@"http://pastebin.com/raw.php?i=VQfP0HgB"; And I have some values in those numbers: ...
2
votes
2answers
113 views

How can I visualize an array of very small vectors spaced on very large grid? [duplicate]

I have data in the form points = {{1, 1, 1}, {1, 1, 2}, ...} vectors = {{2, 2, 5}, {2, 1, 7}, ...} Can somebody help to edit this data so I can ListVectorPlot a ...
2
votes
2answers
124 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
71 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
88 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. ...
1
vote
1answer
71 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
226 views

A Case of DeleteCases for WeatherData

I am trying to use ListVectorPlot in combination with WeatherData and CountryData to show ...
0
votes
2answers
46 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
123 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
41 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
832 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
124 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
137 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
418 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
65 views
1
vote
1answer
125 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
59 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
63 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
130 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
61 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
111 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
68 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
73 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
65 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
110 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
105 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
42 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
64 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
88 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
82 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
74 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 ...