Mathematical vectors, operations on vectors and vectorized programming.

learn more… | top users | synonyms

1
vote
2answers
60 views

How do I do the Minkowski sum of two sets?

I have 2 sets, $X$ and $Y$. How do I find the Minkowski sum of these sets?
0
votes
2answers
57 views

Zero division in linear equation solution

I'm trying to transform a vector to another coordinate system with different root vectors. The other root vectors are defined by three points in space that form a plane, and it's a normal vector. ...
-1
votes
0answers
34 views

Time dependence [on hold]

Given the potential energy P[r_] of interaction between two points and their weight m1, m2, the initial velocity v10, v20 and initial positions r10, r20 of the two points. ...
0
votes
1answer
50 views

Use ParametricNDSolve with Plotting

I am attempting to solve a differential equation of the form $$ \frac{dx}{dt}=ax+by \\ \frac{dy}{dt}=cx $$ with parameters $0<a<1$ and $a,b,c \in \mathbb{R}$. I am able to use NDParametric ...
0
votes
1answer
37 views

Vector Analysis in Version 8

Silly question. Why does Needs["VectorAnalysis`"] Grad[Sin[x^2 + y^2], {x, y}] give the error Coordinates::invalid: "{x,y} is not a valid coordinate system ...
2
votes
1answer
34 views

Plotting Vectors in Mathematic at lat/long positions

I have some current data that I want to plot in Mathematica. The first two columns are the latitude and longitude respectively (longitudes are negative b/c it is west of the prime meridian and all ...
0
votes
1answer
25 views

Protected Tag list and not a vector errors

I am working on a project for school, and I just need to find when the angle between a tangent vector and a line formed between two points. Here is the code I'm using: ...
0
votes
0answers
92 views

Solving Symbolically Equations with Vectors and Matrices

I want to solve equations with vector variables and vector/matrix parameters symbolically. As a basic example I would like to be able to solve something like $[I-aG]x=b$ where $a,b \in \mathbb{R}^l$ ...
5
votes
1answer
88 views

How to define an orthogonal basis in the right way?

I am trying to work with the vector notation without defining vector components explicitly. $Assumptions = (x | y | z) \[Element] Vectors[3] The vectors ...
0
votes
0answers
34 views

Problem with precision in ray tracing

today i was writing a ray tracer to find intersection point between a single ray and a cylinder. ...
1
vote
1answer
61 views

Mathematica error in vector element access

I have the following code, but Mathematica insists that xj is not a symbol! How may I fix that? ...
6
votes
4answers
158 views

Define Function with Sum over a list

I want to define a function that would symbolically look like $$ t(s,\underline{a})=\pi s + \sum_{n=1}^{n_{max}}a_n\sin(n \pi s) $$ (something like a finite Fourier series). Here $s\in [0,1]$ and ...
0
votes
0answers
33 views

How to solve a multi-vector optimization problem efficiently?

How to efficiently solve a optimization problem which involves multiple vectors? My optimization problem is: $\min_{\bf{K}_{i}} \sum_{i<j}\left[\bf{t}\cdot(\bf{K}_i-\bf{K}_j)\right]^2$, s.t. ...
2
votes
1answer
132 views

Inverse gradient operator

I found a nice paper about inverse vector operators here. I have successfully implemented a Mathematica function for most of them, however I can't figure out how to do inverse gradient (page 7 in the ...
6
votes
2answers
189 views

VectorScale Explanation

I'm having great difficulty understanding VectorScale. Here are the definitions from the documentation. With the explicit specification ...
0
votes
1answer
55 views

Weird Vectorplot

I would like to Plot a simple Vector Field, all vectors normalized to one. If i for example take a evenly distributed sample of the field and plot it with the ListVectorPlot function, i get a plot ...
2
votes
0answers
69 views

Extract common factor from vector or matrix

I can't believe this hasn't been asked before but I can't find anything. Is there a way to convince Simplify or FullSimplify to ...
3
votes
1answer
139 views

Introduction to Vectors and NDSolve

I want to use NDSolve for a complicated equation that contains vectors. I am still new to Mathematica, and have really enjoyed what I have learned thus far. Concerning this question, I have already ...
1
vote
1answer
67 views

How to rotate vectors in vector plot?

I'm writing an exam for my calculus students and am seeking help with using Mathematica on a particular problem. Here's my idea: I want to give a multiple choice problem that has four choices of ...
0
votes
1answer
105 views

Simplifying symbolic expressions involving dot products

I have a function that outputs a large expression containing dot products of vectors. None of the vector components are known, so all dot products are symbolic. For instance, part of the output may ...
2
votes
1answer
182 views

How to control the length of vectors in VectorPlot

I want a slope field for a scalar differential equation. For simplicity I have chosen $dx/dt=rx$, where $r$ is a parameter. I used VectorPlot for the slope field as you can see from the code below. ...
2
votes
1answer
70 views

How can I use parts of lists with Dynamic?

I'm a newbie - what am I doing wrong? I want to use parts of lists (vectors) in calculations but Mathematica will not evaluate anything that involves parts of lists that update dynamically. Is there a ...
0
votes
2answers
86 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
52 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
44 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
141 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
68 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
55 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
122 views

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

I wish to implement the following recursion efficiently. ...
1
vote
0answers
88 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
175 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
46 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
524 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
228 views

Solving vector equations

I made this very simple module to try and solve vector X: ...
3
votes
2answers
171 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
97 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
88 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
104 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
80 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
120 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
142 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
115 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
102 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
89 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
270 views

“NotAvailable” and “NotApplicable” data points returned by 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
133 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
44 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
1k 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
135 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 ...