Mathematical vectors, operations on vectors and vectorized programming.

learn more… | top users | synonyms

1
vote
1answer
44 views

Linear Fit of multidimensional data

I am trying to find linear decomposition of vector B (of arbitrary dimension $n$) in the form : $B = \alpha_{1} C_{1} + \alpha_{2} C_{2} + ...$ where $C_{i}$ are known vectors (of dimension $n$) ...
14
votes
2answers
474 views

How to detect loops in a vector field?

Given a vector field and I'd like to detect if there are streamlines in closed patterns. For example, if the input is a vector field like this: ...
2
votes
3answers
73 views

Making a list of functions

Suppose I have the following equation system to solve: x(t_):={x1(t),x2(t)}; DSolve[x'(t)==x(t),x(t),t] This code works fine, but now suppose that instead of 2 ...
3
votes
2answers
85 views

Creating a tube with custom caps

I need a tube with only one end capped. I can do this relatively easily with: ...
0
votes
2answers
67 views

How does one define a function that takes vectors as arguments but also derivatives?

Summary: tldr; I just want to implement a version of the following mathematics function: $$ f(a) = c_1 e^{-(a - t_1)^2} + c_2 e^{-(a - t_2)^2} + c_3 e^{-(a - t_3)^2}$$ in mathematica, and be able ...
1
vote
0answers
44 views

Transform a vector DE into a set of scalar DEs [closed]

I have the vector equality: {{a,b},{c,d}}.D[{x1[t],x2[t]},t]=={{e,f},{g,h}}.{u1[t],u2[t]} I want to solve this using DSolve. ...
2
votes
1answer
53 views

Transforming an Optimization Problem into a multi-vector Optimization Problem

I am sitting on an MultiAgent optimization problem trying to solve for a quadruple of variables {e,l,b,c} In a single agent (...
5
votes
2answers
183 views

Is it possible that we can use “+” to add two vectors in polar form?

For example, $a=(2,\pi/4)$, $b=(3,\pi/3)$, if we want to get the result of $a+b$, using + operator will not do, because mathematica will ignore the polar form, and ...
0
votes
0answers
41 views
0
votes
1answer
53 views
0
votes
2answers
87 views

vectors constructed with $0,1$ permutation

Our desire is to construct $2^N$ vectors with indices $i=1,..,2^N$ with elements by permutation of $0$ and $1$. For example ($N=3$): We write below code ...
0
votes
1answer
53 views

Designing a loop that fetches 5 random vectors each with 5 components from a set of 10 until Linear dependence is found

I am currently trying to find a way to make a loop that will select 5 random columns without replacement of a 5x10 matrix until it finds a determinant equal to 0 out of the new matrix formed by the 5 ...
0
votes
0answers
38 views

How to solve a system of equations which includes vectors? [duplicate]

I'm starting to wonder if this is something that mathematica just can't do? I thought something like this might work: ...
1
vote
1answer
57 views
4
votes
1answer
69 views

Superimposing ListLineIntegralConvolutionPlot with transparent noise over ListContourPlot

I have an array of 128x256 data points in a rectilinear array. For each point there is a 2D vector quantity and a scalar quantity (normalised to -1 <= x <= 1). I very much like the ...
0
votes
0answers
19 views

PolynomialGCD in complex numbers for vector simplification

I wanted to define a function $f(t,\vec{r})=e^{i\omega t-i\vec{k}\cdot\vec{r}}$, and take gradient of it. With, ...
7
votes
2answers
377 views

Defining quantum-mechanical Bra and Ket operations

I have the following ket in the Fock basis: $\vert3, 0 ,1\rangle$, where each entry defines the number of photons in a particular mode and can take any one of the following numbers: 0, 1, 2, 3. As a ...
0
votes
1answer
49 views

Beginner: Iterative Sequence for Vector Function

I want to create an iterative sequence for two Vectorfunctions, where both are dependent on the same variables and i represents the vector. For simplicity let's ...
3
votes
2answers
236 views

How to make Mathematica show matrices and vectors nicely

It shows me like {{0}, {1}, {0}, {-1}} . Is it possible to make it look like a vector, always?
0
votes
0answers
35 views

Working with vector-valued functions to solve an ODE

Let's say I have a simple vector-valued ODE given by $y'(t) = K*y(t)$ where K is a matrix $K_{n_{X}n}$. Let's assume that the matrix is $K_{21_{X}21}$, $K = \left[\begin{array}{cccc} k_{1_{X}1} ...
3
votes
2answers
101 views
1
vote
1answer
79 views

Divide each element of a list of 500 matrices by another matrix

Lets say that I have a Table of dimension (3,3,500) and I'd like to perform element-wise division by a 3x3 matrix along the third dimension (of length 500 in this case). What is the most elegant way ...
1
vote
1answer
90 views

Plot a numerical integration as a function of a variable

Suppose we have a function that is hard to evaluate analytically but a numerical estimate suffices. For example consider the $f(x,\Lambda) = \Lambda\cdot \sin(x)$ where $\Lambda$ is some parameter I ...
0
votes
2answers
72 views

Plotting vectors using derivatives

This question stems from a previous question I asked here: Multiple Integral of equation including dx prime? An equation describing a gravitational field of a cuboid is given as: $V(X,Y,Z) = -G\rho ...
2
votes
3answers
65 views

Referring to the components of a vector within a sum

I feel like I'm missing something obvious here, but.... I'm playing around, trying to do the standard deviation for my stats homework (don't worry, I already worked out the answer by hand), and I ...
1
vote
2answers
76 views

Problem in matrix multiplication

I created a random directed acyclic graph using Mathematica. I need to compute a specific function from its adjacency matrix. ...
0
votes
0answers
51 views

Controlling scaling of multiple vector fields in VectorPlot3D

I'm trying to plot the electric and magnetic fields of a relativistically moving electric charge using VectorPlot3D, and apply "Manipulate" to change the velocity. The code I'm using is as follows: ...
0
votes
0answers
71 views

Find the point of intersection of A,B,C-plane and D1D2-line

The problem. Five points A,B,C,D1 and D2 in R3 are given. (1) Determine whether three points A,B,C are collinear(i.e. lie on the same line). (2) If A,B,C are not collinear, find the plane that ...
0
votes
0answers
26 views

How do I get Mathematica to evaluate symbolic linear algebra [duplicate]

First of all, I am VERY new to Mathematica. That said...I have defined vectors as: e1=2x-y and e2=x+y (x and y are orthonormal). I also defined the dot products of x and y in Mathematica. I want to ...
3
votes
2answers
182 views

Vector Plot of a linearly varying cantilever

I want to drawing with Vector Plot a deflection and slope of a linearly varying cantilever. And with Contour Plot it works but with Vector Plot it didn't. Here is the code: ...
-1
votes
1answer
70 views

ParametricPlot3D won't show [closed]

I want to see the image of a tube made from a space curve. I define the surface using Frenet-Serret frame but the software does not show me the plot. What might be wrong with my code? Thank you.
-3
votes
1answer
64 views

Error in cross product [closed]

I want to take the cross product of two rather complicated vectors but Mathematica gives me error: Here is the input: The error I get is "The expression pu cannot be used as a part specification." ...
0
votes
3answers
44 views

Define a function of a vector without fully specifying the components of the vector [duplicate]

I have a vector $A=\{1,2,3,4,5,6\}$, and I want to define a function of $A$ as f[A_]:=A.X where $X$ is another vector. I want to define this function without ...
0
votes
2answers
65 views

Vector optimization with vector length as a free variable

I'm trying to solve the following problem: For a vector $v$ of length $c$, $\min \frac{\sum v[i]^4}{(\sum v[i]^2)^2}$ subject to $\sum v[i] = N$. I can solve this numerically for a given $c$ using ...
4
votes
1answer
99 views

How to use DSolve with vectors without decomposing into vector components?

Given a basic, two-dimensional ballistic trajectory problem, I can solve the equations of motion using DSolve (or NDSolve) by ...
2
votes
1answer
99 views

Interpolate a discrete vector field

I have a discrete vector field, from which I want to derive the continuous one. For example, the planar vector field is defined by: ...
0
votes
0answers
68 views

ParametricPlot3D doesn't work with components of a vector input

I can't understand why ParametricPlot3D works, when the input is a vector and does not work, when the input is separated components of the vector (it returns an empty plot). The same happens for ...
1
vote
1answer
30 views

Inverse KroneckerProduct given other arguments

I'm having problems working out how to do the inverse of a two argument Kronecker Product, given one of the decomposed column vectors. For example, say I have used the Kronecker Product on two ...
0
votes
1answer
97 views

Phase Portrait Trajectories

How do I make a phase portrait which looks like the ones demonnstrated here? Not the fancy version where I can use the controls to change it, just a screen-shotted version of say a spiral point? Any ...
1
vote
0answers
48 views

StreamPlot in 3 Dimensions

I would like to plot the vector equation $\left( {\begin{array}{*{20}{c}} {\frac{{ - a + \sqrt {{a^2} + 4bc} }}{c}}\\ {\frac{{ - a - \sqrt {{a^2} + 4bc} }}{c}}\\ 1 \end{array}} \right)$ as a stream ...
4
votes
1answer
125 views

How can I implement this recurrence equation in Mathematica?

I asked a similar question yesterday but today I realized that I was implementing the wrong function. I have tried changing the implementation but I can't get it to work. Problem: There is a river ...
2
votes
2answers
191 views

How can I express this recurrence function in Mathematica?

\begin{equation} r_{i+1}=r_{i}+V_{i}{\Delta}t \end{equation} Where \begin{equation} V_{i}=(0.01, 0.40) \end{equation} and ${\Delta}t$ is the difference in time. My implementation (this is for ...
1
vote
2answers
140 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
77 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. ...
0
votes
1answer
132 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
45 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
56 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
41 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: ...
1
vote
0answers
249 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$ ...