Questions tagged [vector]

Mathematical vectors, operations on vectors and vectorized programming.

Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

Convert a polynomial to a vector

I am trying to transform a generated polynomial terms into a vector, I used the command 'MonomialList', ...
user avatar
0 votes
1 answer
46 views

Total Spin Matrix Squared (Casimir Operator)

I am trying to get Mathematica to compute the Casimir operator of a 4 particle system of spin $1/2$ fermions. I have the following code which does not do what I would like it to. ...
user avatar
  • 137
0 votes
0 answers
65 views

How to matricize a vector?

I am wondering how to represent a vector as a matrix, using specified dimensions. For example, MatrixForm[{a, b, c, d}] gives me a column vector. But I would want ...
user avatar
0 votes
1 answer
86 views

How do I find the unit vector in the direction of the minimal rate of change?

A ball falls on the surface $x^4 z+x^9 y^2+y^2 z^3=65$ at the point (-1,-3,2). How do I find a three-dimensional unit vector in the direction that the ball will begin to roll. I know that the ball ...
user avatar
  • 85
4 votes
2 answers
137 views

How to subtract a list from certain sublists of a list? [closed]

I have a problem in doing an operation on this vector {{2,3},{3,4},{5,6}}-{1,1} I want to minus this to get the result ...
user avatar
1 vote
1 answer
146 views

Solving equation set with vectors

I have six unit vectors in real $3$D space v1,v2,v3,v4,v5,v6; Represent the dot product between some of the vectors as the Cos ...
user avatar
  • 270
0 votes
1 answer
62 views

Output not showing in For loop

My code is ...
user avatar
0 votes
1 answer
38 views

Reduce expressions into (simplified) matrix and vector forms

I have some computation that results in a rather complicated looking expression that could be much simplified by converting it into matrix or vector expressions. For example, instead of ...
user avatar
  • 206
2 votes
1 answer
94 views

Dot Product of Vector with matrix components

In Physics it's common to write matrices in vector components to simplify notation. This commonly occures with the pauli vector $\vec\sigma = \begin{pmatrix}\sigma_1 & \sigma_2 & \sigma_3\end{...
user avatar
0 votes
1 answer
61 views

Finding the Curvature of the path of a particle

How do I find the curvature of the vector when t=5? The function is: v[t_] := {2 t^4 + 2, 6 t^3 + 1, 3 t^2 + 4}
user avatar
  • 85
2 votes
0 answers
61 views

Finding the Torsion given a vector r[t]

How do I find the torsion of a vector? The function is: r[t_]:={Sin[7t],t^4,Cos[7t]}
user avatar
  • 85
1 vote
2 answers
74 views

How would I find the Binormal vector? [duplicate]

How would I find the Binormal vector if r[t_]:={sin(7t),t^4,cos(7t)} in Mathematica? This is the Mathematica code I have: ...
user avatar
  • 85
1 vote
0 answers
39 views

I am searching for the Eigen stuff of a non linear transformation

I have a slightly odd problem I have been working on as part of a project on probability models. The full problem itself is not relevant but here is where I am stuck. I have a 6D space $P$, where all ...
user avatar
0 votes
0 answers
40 views

How would you write a electric field in cylindrical coordinates?

I am new to Mathematica and I am trying to automate the process of finding electric and magnetic fields for TE and TM modes in a cylindrical superconducting cavity. I could not find documentation ...
user avatar
4 votes
2 answers
263 views

Is it possible to solve vector equations?

For example if we define parametric line segment curve1[t_, p1_, p2_] := t*p2 + (1 - t)*p1; where p1 and ...
user avatar
  • 725
2 votes
1 answer
115 views

Writing a system of ODEs in vector form

I have the following system: $\frac{dx}{dt} = p_x \\ \frac{dy}{dt} = p_y \\ \frac{dp_x}{dt}=-\frac{\partial V}{\partial x} \\ \frac{dp_y}{dt}=-\frac{\partial V}{\partial y}$ ,where $V(x,y) = \frac{1}{...
user avatar
  • 199
0 votes
1 answer
68 views

How can I remove the attributes "Orderless" from function Times stably and reliably?

Recently I have been doing some algebra of partitioned matrices, where product like below is common: where $A_{11}, A_{12}, X, Y$ are all partitioned matrix blocks thus all are matrices in essence. ...
user avatar
  • 289
0 votes
1 answer
90 views

dot product and norm [closed]

Can you solve the following problem in mathematica program? Thank you. Let x=(x1,x2,x3),y=(y1,y2,y3) and ⟨x,y⟩=x1y1+2x2y2+x3y3 be an inner product in a three-dimensional real vector space. Define the ...
user avatar
0 votes
0 answers
60 views

Can I use assumptions to declare a variable's type?

I'm trying to declare $P$ as a vector. I searched for a while, the closest way seems to be Assumptions: ...
user avatar
2 votes
0 answers
90 views

Bug with ListVectorPlot in 12.3.1?

Bug fixed in 13.0.0 The documentation shows that result of ...
user avatar
  • 271
2 votes
0 answers
47 views

Why does the dot product between a matrix and a vector not work? [duplicate]

Executing this code: ...
user avatar
  • 2,721
3 votes
1 answer
119 views

How can I do operations in this basis (using matrices)? [closed]

Let's define $u=t+1/2$ $v=t-1/2$ Now, I have vectors in the basis $e_n=u^n-v^n$, I want to apply functions to such expressions, but as a result get expressions in the same basis again. For instance, $...
user avatar
  • 2,721
1 vote
0 answers
40 views

How to generate a Gaussian random velocity field

Let us assume we have a 2-dimensional velocity field $\textbf{u}=(u_x,u_y)$ defined via its stream function $\psi(\textbf{x})$ as \begin{cases} u_x=\partial_y\psi(\textbf{x}) \\ u_y=-\partial_x\psi(\...
user avatar
0 votes
0 answers
74 views

piecewise vector field and composition of piecewise functions

I have the following vector field ...
user avatar
  • 41
0 votes
2 answers
56 views

FindRoot with vector function

I have trouble with FindRoot for vector variables, I have search MMA SE find a solution. in Szabolcs‘s code, Vector FindRoot ...
user avatar
  • 445
1 vote
1 answer
55 views

Why doesn't my code evaluate element of a vector at a given t?

I have written a code to solve the Shrodinger equation for a particular three level siystem in two ways: the first way I defined three functions C1[t], C2[t], C3[t] and I solved three ODEs; the ...
user avatar
1 vote
1 answer
49 views

Interpolate function against time

I have two vectors called lammdaWind11 and timeWind11. They are of size 51*1. I have interpolted each one independently as ...
user avatar
0 votes
0 answers
53 views

velocity four-vector definition by xAct

I want to define the velocity vector by the following relation and evaluate the norm of the vector by using the Minkowski metric. I have defined the tensor x (position tensor) in xAct, but I don't ...
user avatar
0 votes
0 answers
58 views

Is it possible to generate a random vector space in Mathematica?

The idea is that I’d like to try to use Mathematica to work through proofs. So if a proof says, “Let there be a vector space V…”, I would like to see a concrete representation of that vector space in ...
user avatar
0 votes
1 answer
49 views

Plotting two vector fields $\vec V_1=-y\hat i+x \hat j$ and $\vec V_1=2\vec V_1$ on the same plot

I want to compare how two vector fields $\vec V_1=-y\hat i+x \hat j$ and $\vec V_1=2\vec V_1=2(-y\hat i+x \hat j)$ various concentric circles $x^2+y^2=a^2$ with $a^2=1,2,3$ etc. I can plot them ...
user avatar
1 vote
3 answers
67 views

Drawing circles on top of a vector field drawn using VectorPlot

I am using the command VectorPlot[{{y, -x}}, {x, -4, 4}, {y, -4, 4}] to plot the vector field $\vec{V}=y\hat{i}-x\hat{j}$. On top of this, I need to draw circles of radii $1,2,3...$, etc. I am no ...
user avatar
0 votes
2 answers
81 views

How to find a matrix satisfying following equation

I have a $N \times 1$ vector $F(t)$ for $0\leq t \leq 1$. I want to find a $N\times N$ Matrix $C$ (a real-valued matrix) satisfying the following equation: $$\int_0^t F(t_0)dt_0= C.F(t)$$ If it ...
user avatar
  • 483
3 votes
0 answers
57 views

Using ColorFunction Rasterizes the plot

When I make a simple plot using ColorFunction, the Mathematica rasterize the plot. Is anyone else having this issue? Does anyone know a way to avoid this? ...
user avatar
  • 31
1 vote
1 answer
118 views

how to rotate a 3D vector around arbitrary axis

I have three vectors red, blue, and green and their origins are at (x,y,z) where red and blue are perpendicular and can be rotated together in the x-y plane by ...
user avatar
1 vote
1 answer
83 views

Generate a normalized Haar-random vector

What is the procedure to generate a random qutrit quantum state? That is, I want to generate a $3 \times 1$ vector $u$ such that $u$ is generated by a Haar random $3 \times 3$ unitary $U$ multiplied ...
user avatar
1 vote
4 answers
103 views

multi-dimensional interpolating function evaluation and extract dimension

I have an interpolating function which output dimension is greater than 1, so it's a vector. I get it as the result of a NDSolveValue. The problem is that I'm not able to Evaluate it. I would obtain ...
user avatar
1 vote
1 answer
48 views

How to make a vector of elements the pattern of a function?

if I have an expression that contains a lot of symbolic elements and I would want to make it a function of the vector containing all the elements I've found a solution based on rule delayed: ...
user avatar
3 votes
1 answer
56 views

Plotting translated vector fields from user-defined functions

I have two time- and space-dependent vector fields, one which is: $\mathbf A(x,y,t) = -y \, t \, \hat{\mathbf x} + x \, t \, \hat{\mathbf y}, \tag 1$ and another $\mathbf B(x,y,t)$ which is $\mathbf A$...
user avatar
  • 433
0 votes
0 answers
35 views

How To Define Indexed Vectors

I have to define two 2-D vectors to be multiplied by a matrix and multiplied by several Clebsch-Gordan coefficients. Below are my definitions and my attempt at computing the sum. ...
user avatar
0 votes
0 answers
36 views

Looking for a starting point to solve a PDE with vector-coefficients

I am looking for a good source for Mathematica in order to solve a PDE with vector coefficients. I have found this: https://reference.wolfram.com/language/FEMDocumentation/tutorial/SolvingPDEwithFEM....
user avatar
  • 235
2 votes
1 answer
118 views

Using Curl and Grad in cylindrical coordinates gives different result than in Cartesian

I am doing a quite elementary calculation to verify $$ \vec \nabla\cdot V = \vec\nabla \times \vec A $$ Where $V$ is just some scalar function in $\rho$, $\phi$ and $z$ and $A$ is defined as $$ ...
user avatar
7 votes
2 answers
212 views

Imposing breaks in contours in a ContourPlot without rasterization

In this question, we are asked to compute breaks in the contours of a ContourPlot so as to place contour labels (values) atop the colored boundaries rather than the ...
user avatar
2 votes
3 answers
177 views

add columns of list {a0,b0} to columns of list {{a0,b0} ,{a1,b1} ,{a2,b2} ...{ax,bx} } [closed]

If I want to add the columns of {1,2} to each of the columns of say {{1,2},{3,2},{4,2}} resulting in {{2, 4}, {4, 4}, {5, 4}} How would I do this? and for any ...
user avatar
  • 325
0 votes
2 answers
118 views

How can I create and plot (in the same diagram) 1000 different vectors in Mathematica? [closed]

I'm new to Mathematica and I got stuck. Also, I'm not a programmer, so I would like to ask the following question. I want to make 1000 different vectors, of which everyone contains 55 random elements. ...
user avatar
0 votes
0 answers
55 views

Steam plotting of vector field showing empty output

I am trying to plot the stream lines for a vector field function, whose definition is exported to the wdx file uploaded here. The following simple code returns an empty plot: ...
user avatar
1 vote
0 answers
56 views

Grouping vectors into groups of 3 by attribute

Three groups are given, each with eight $3 \times3$-vectors: ...
user avatar
  • 1,626
0 votes
1 answer
96 views

How do I set an element of an already-defined vector function to some expression?

I'm defining a vector whose elements depend on time, i.e. I'm defining a real vector function of real elements that depend on the real scalar time variable. The vector function is named ...
user avatar
  • 433
4 votes
4 answers
253 views

Is there an easy way to copy a TableForm column and convert it into a vector?

Is there an easy way to take a column output from a TableForm command, like this: ...
user avatar
  • 621
0 votes
1 answer
125 views

Derivative matrix by vector in Mathematica

This is an excerpt from the article https://www.sciencedirect.com/science/article/abs/pii/S0094114X10000418. How do I write this using vector-matrix operations (...
user avatar
  • 1,626
0 votes
1 answer
62 views

Derivative of Kronecker product by vector in Mathematica

I'm struggling with the following problem. It is necessary to find the derivative expression with respect to the vector $u$: $r(u,v)=[(u-v)(u-v)^T]\begin{pmatrix} 1\\ 1\\ 1 \end{pmatrix}=[(u-v)\otimes ...
user avatar
  • 1,626

1
2 3 4 5
12