Skip to main content

Questions tagged [vector]

Mathematical vectors, operations on vectors and vectorized programming.

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

Issues in solving a differential equation for a modified matrix

Following program works fine as it gives a solution to the differential equation here ...
phy_std's user avatar
  • 143
0 votes
0 answers
37 views

Issue with simplifying an expression with "ConjugateTranspose"

Why does the output [6] have Conjugate in it even when I explicitly mention that $c>b$ and all other parameters are real? ...
phy_std's user avatar
  • 143
0 votes
0 answers
63 views

Solve Orr–Sommerfeld equation equation and plot a vector plot

I am trying to solve Orr–Sommerfeld equation and trying to plot a vector plot. Can Initial condition be given as a vector v(y,t=0)=[1 2 3]? https://en.wikipedia.org/wiki/Orr%E2%80%...
Ratul Sengupta's user avatar
-2 votes
2 answers
101 views

How to convert a triangle into a vector triangle?

...
csn899's user avatar
  • 4,531
1 vote
2 answers
98 views

How to demonstrate the acceleration using spherical coordinates and spherical unit vectors?

I've been trying to use Mathematica to demonstrate using spherical coordinates and unit vectors the acceleration for a particle moving in a sphere. Nevertheless, I'm actually not that skilled in ...
not_aphysicsdr's user avatar
8 votes
5 answers
354 views

Element-wise vector-matrix exponentiation

I would like to exponentiate the vector x = {x1,x2} element-wise with the non-square matrix A = {{1,0},{1,1},{0,1}} so that the ...
hr8tpa's user avatar
  • 83
1 vote
1 answer
69 views

What is vector CB expressed in terms of vectors m and n?

In triangle ABC, point D is on AB, and BD is equal to 2 times DA. Let vector CA be equal to vector m, and let vector CD be equal to vector n. What is vector CB expressed in terms of vectors m and n? ...
csn899's user avatar
  • 4,531
4 votes
2 answers
118 views

How to call a list of pure functions/pure vector function? [closed]

In one dimension, pure functions work as usual: f = Function[{x}, 2 x] f[a] However, with a list of pure functions / a vector pure function this does not work with ...
faber's user avatar
  • 81
8 votes
7 answers
486 views

How to create an array from all combinations of the vector components?

Say I have vectors {a,b,c} and {w,x,y,z}. How can I get Mathematica to output an array ...
A P's user avatar
  • 225
4 votes
1 answer
131 views

Forcing Explicit Parentheses in Traditional Form

I have an expression in input form for the Cosine of a dihedral angle: ...
Stuart Poss's user avatar
  • 1,933
0 votes
1 answer
57 views

Optimized and compact code for tensor product

I am calculating products like in mathematica. In the given relations eta's are four vectors, $\gamma$'s are the Dirac matrices, $\sigma^{\mu\nu}$ is the anticommutation of the gamma matrices and ...
Zohaib Aarfi's user avatar
0 votes
0 answers
48 views

Finding coefficient of vector expression when using SuperLie package

I'm using the SuperLie package and using that have defined a Lie superalgebra with an ordered basis: ...
AXidenT's user avatar
  • 133
1 vote
0 answers
135 views

RG flow trajctory plot using StreamPlot

I have three flow (beta-function) equations: $\frac{dA}{dl}=-(B^2+C^2)$, $\frac{dB}{dl}=(2-4A)B$, $\frac{dC}{dl}=(2-A)C$, where $A=\pi/(2\arccos(-(x+y)/2)$, $B=(x+y)/2$ and $C=(x-y)/2$. I can make a ...
Barry's user avatar
  • 123
4 votes
2 answers
91 views

Easy way to plot a vector as an arrow

Is there an easy way to use the Mathematica command Plot to draw a vector arrow from one point p1 to a second point p2? Like in the plot below where p1=(0,0) and point p2=(4,6)? I got it to work ...
Chris O's user avatar
  • 91
1 vote
2 answers
55 views

Strange behavior when integrating vector valued piecewise function

The following straightforward integral should clearly equal $\{0,0\}$ for any $R\in\mathbb R$: ...
Funktorality's user avatar
2 votes
1 answer
82 views

Delete Null factors out of vector components

After running a very long loop, I get the following result given by a very long vector: ...
Daniel Vainshtein's user avatar
0 votes
0 answers
32 views

How to find clear solution for iterative problem by condition $<v_k ,v_n>=0$ If $k!=n$

I want to find x[n] by v[n] values without x[n] in solution by iterative below problem: <...
user68119's user avatar
3 votes
2 answers
508 views

Rendering of arrowheads in 3D

I have a vector-valued function and vectors have been drawn with Arrow for visualization purposes. ...
Syed's user avatar
  • 56k
9 votes
3 answers
2k views

Mimicking Günther Uecker's nail art

One of my favourite contemporary artists is Günther Uecker (born 13 March 1930 in Crivitz, Germany). He uses hammer and nails to create VectorPlot-like structures. ...
eldo's user avatar
  • 81.8k
0 votes
3 answers
126 views

Scalar product of vectors using dummy indices

How can I rewrite the following expression $expr1= (A\cdot B)(C\cdot D)(E\cdot F) + (A^\prime\cdot B^\prime)(C^\prime\cdot D^\prime)(E^\prime\cdot F^\prime) +\cdots $ in terms of the components as $...
Harken's user avatar
  • 105
0 votes
0 answers
94 views

Solve does not find solutions to large equation rotation matrix

I've been seeing some posts already where people mention Solve needs a bit of help to get things solved in some scenarios. I have been trying to figure out the solutions for equations. For the XYZ ...
Jose's user avatar
  • 11
1 vote
1 answer
130 views

Using "Table[]" to create a matrix without submatrices [duplicate]

I'm trying to create a certain 6x6 matrix using Mathematica's in-built "Table[]" function and have landed on ...
ConfusedCabbage's user avatar
0 votes
3 answers
114 views

Generalize the code to more variables

I have this code it runs and gives me the solution. How can I make it more compact and If I want it to extend(generalize) it to more variables how can I do it. I had asked a similar question here (...
Learner's user avatar
  • 219
1 vote
1 answer
107 views

Modify the size of vectors in VectorPlot3D

I'm trying to plot in the neighborhood of the origin and I can't change the shape and size of the arrows. What I need is to be sure whether or not the solutions are attracted to the line that goes ...
Roberto De Arcia's user avatar
1 vote
2 answers
53 views

Extracting integers from a Dataset containing variables

I want to extract two vectors DataA = {1,0,0,0} and DataB = {0,2,5,0} from a dataset. I tried a few ways including using the dataset and ...
krygh's user avatar
  • 157
1 vote
2 answers
101 views

Can you recover the original vectors that, when summed together, achieved a particular criteria

I am wondering if it is possible to take the binary strings of length $3$ (tuples) whose sums have weight $2$ (i.e they have $2$ non-zero entries)(binary case, meaning they have two $1$'s entries) $$u ...
am567's user avatar
  • 627
1 vote
1 answer
38 views

How to find and delete the duplicates from lists of vectors

What I want to do is to take a list of vectors: u={{1,0,0,0},{0,1,0,0},{0,0,1,0}} v={{1,1,1,1},{1,0,0,0},{0,1,0,0}} I want to find the duplicates between u and v ...
am567's user avatar
  • 627
1 vote
0 answers
74 views

Mapping two pure functions over different lists

Say if I have two lists of vectors of the same length, for example: u = {{1,0,0},{0,1,0},{0,0,1}} v = {{1,0,1},{1,1,0},{1,1,1}} I want to add (modulo 2) ...
am567's user avatar
  • 627
1 vote
1 answer
96 views

Labelling vector state variables for solution of system of ODEs

This might be a duplicate, but I have not seen this problem addressed for DSolve usage. I have a system of ODEs of the form Y' = AY + B When we put this into Mathematica as a vector variable: ...
Nicola Gambaro's user avatar
2 votes
2 answers
54 views

How to delete duplicate lists of vectors (in any order) from a list of lists?

I have a list of vectors: v={{{0,0,0},{0,0,1},{1,1,0}}, {{1,0,0},{1,1,1},{0,1,1}}, {{0,0,1},{0,0,0},{1,1,0}}} Clearly, the first entry and the third entry contain the same vectors. I want to delete ...
am567's user avatar
  • 627
1 vote
1 answer
113 views

Extend the code for more variables (at least 100)

I have this code (not in best shape) for a problem in 3 variables. It does the job. The problem is I want to extend this to more number of variables around 100 at least. It is very painful to extend ...
Learner's user avatar
  • 219
0 votes
2 answers
84 views

Understanding SetDelayed, ":=" [closed]

Consider the example below, p = {1, 2, 3}; x = {x1,x2,x3}; fun[x_] := {{1, 0, 0}, {0, 1, 1}} . (p + x); fun2[x_] = {{1, 0, 0}, {0, 1, 1}} . (p + x); I expected <...
Adriana LE's user avatar
20 votes
2 answers
1k views

Visualizing gravity warping the fabric of spacetime

What is a stable way of creating a set of points that are attracted to a single moving point? I have tried the following: ...
martin's user avatar
  • 8,778
1 vote
1 answer
102 views

Vector 3d Plotting with New Mathematica Version

Hi Used to use the old version of Mathematica back in 2020. Now the new version is updated and I am trying to run the old code in the new version. My vector plots are very different. I wonder what I ...
physicsu83's user avatar
4 votes
1 answer
198 views

3d Vector Wrap of Half sphere

How I can plot the flowing image using Mathematica? Thanks,
physicsu83's user avatar
2 votes
1 answer
49 views

NMaximize with generic domain

I want to have a function that gets generic domain and function and does maximum on this domain. For this I tried the following straight-forward code: ...
user2679290's user avatar
4 votes
2 answers
171 views

Two simple vector partition rules

We have a vector of zeros and other numbers, f.e: vector = {0, 0, 0, 9, 0, 2, 0, 5, 0, 4, 0, 5, 6, 2, 0}; The two rules: Partition the vector in such a way that (1)...
eldo's user avatar
  • 81.8k
0 votes
0 answers
55 views

How to find linearly independent linear combinations of a set of vectors (general case)

If I have a list of vectors, say $v=\{v_{1}, v_{2}, \dots ,v_{n}\}$. Is there a way that I can get all linearly independent linear combinations of these vectors, such that if I change the content of ...
am567's user avatar
  • 627
2 votes
1 answer
85 views

Differentiating unit tangent vector does not work

I am new to Mathematica and I want to visualize the tangent and normal vector field of a particular embedding of the circle. In my code it is [CapitalGamma][s]. When I put the unit tangent vector (uT[...
Ama's user avatar
  • 35
4 votes
1 answer
109 views

Building projection operators efficiently

The projection operator $P$ is defined in quantum mechanics as $$ P=\sum_i^n \vert\psi_i\rangle \langle \psi_i\vert, $$ where $\vert\psi_i\rangle$ is a column vector and $(\langle \psi_i\vert=(\...
wooohooo's user avatar
  • 319
2 votes
0 answers
40 views

Coloring Vector if it points at (0,0,0) or (1,1,1)

I'm trying to plot a 3D vector field on a cubic space between [0,1]. I wanted to color the vectors based on their direction, where if they point towards (0,0,0) or the closer corners (1,0,0), (0,1,0), ...
Alexandre Pires's user avatar
1 vote
2 answers
99 views

Generate family of linear inequalities from vector variable for use in `FindInstance`

Suppose that I have a vector variable xvec = Array[x, 10]. How do I generate the family of linear inequalities $$F = \{ {x\in\mathbb{R}^{10}:x_1\geq x_2,\ldots,x_9\...
rrrrr's user avatar
  • 125
0 votes
1 answer
111 views

Taking the inverse Laplace Transform as a vector operation

I am solving a system of first-order equations using matrix operations and the Laplace Transform. I begin with the matrix equation that represents the solution to my system, like this: $$ \underline{\...
villaa's user avatar
  • 187
0 votes
1 answer
97 views

put vectors inside a vector

I have an empty vector like U = {}. In an iteration, I get u1 = {a, b} and I want to put the vector in U to have {{},{a,b}}. I can do this simply with U = {U, u1} command. But in another iteration, I ...
Mohammad Alinejad's user avatar
0 votes
2 answers
90 views

How to get Mathematica to carry out my computation of a vector norm fully?

I am relatively new to Mathematica, and I have come across the problem where Mathematica often doesn't seem to carry out calculations fully. For example: I have a vector v and want to find its norm, ...
Q.Ask's user avatar
  • 15
4 votes
1 answer
173 views

ConjugateTranspose[#] vs Conjugate[Transpose[#]] for lists [duplicate]

Bug introduced in 12.3 or earlier, fixed in 13.0. I'm getting contradictory behavior for eigenvectors of a matrix when using Conjugate, Transpose and ConjugateTranspose. I'll demonstrate using an ...
Nitin's user avatar
  • 431
1 vote
2 answers
66 views

How to keep arrowheads in successive vectors?

I am generating successive arrows to represent vectors, but when they coincide all the arrowheads disappear except the last. But since they are vectors I want to keep all arrowheads to show direction. ...
cybervigilante's user avatar
8 votes
2 answers
398 views

Dot Product and Simplification

How to simplify the expression a b . x/((a b) . x) Where a is a scalar and b and x are vectors. I have tried the usual Simplify, FullSimplify, TensorExpand etc. ...
Breugem's user avatar
  • 795
1 vote
0 answers
62 views

Positioning of Text in a Graphics3D

I have an interesting problem to solve. I want to have Text in a Graphics3D. This can easily be done in the following way: ...
mathematica_guy's user avatar
3 votes
1 answer
96 views

ReplaceAll Elements in an Indexed Vector

Following up on how to define symbolic vectors Let x be an n-dimensional symbolic vector, where n is a positive integer large enough to be a massive pain in the butt. ...
NullPointerException's user avatar

1
2 3 4 5
14