Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
61 views

Summary Using the Eigen library, I see significantly different numbers of BiCGStab iterations when I solve Ax = b with a right-preconditioner, i.e., [A M^(-1)] Mx = b, (a) by precomputing A M^(-1) ...
josh_eime's user avatar
  • 196
3 votes
0 answers
79 views

I am trying to develop a linear algebra library in rust. So, as part of it I am writing code that iterates through a n-dimensional array and returns mutable references. It's like writing a view for a ...
SpatialFuel's user avatar
0 votes
0 answers
44 views

Lattices are hard for some of us who heard from the infamous lattice attack on ECDSA, but now i am in a situation where understanding it will be much helpful. I have the following k0 = 0x447B846F ...
actgroup inc's user avatar
0 votes
1 answer
98 views

I am trying to compute the eigenvalues, left, and right eigenvectors of a Laplacian matrix in Python. Here is my matrix: lap = [[-2. 1. 0. 1.] [ 1. -2. 1. 0.] [ 0. 1. -2. 1.] [ 1. 0. 1. -2.]] I ...
sjhaque14's user avatar
  • 123
1 vote
1 answer
148 views

I am following a paper that uses a Hermitian covariance matrix and inverts it to produce a Fisher matrix. I construct my covariance as Gamma[i,m,n], stored inside a larger array of shape (n_z, n_k, ...
Miguel's user avatar
  • 143
1 vote
0 answers
106 views

This is a crosspost from the Math Exchange forum, it seems to me that this question can be approached in two different ways so I am curious about different approaches. https://math.stackexchange.com/...
glowl's user avatar
  • 51
6 votes
1 answer
135 views

I'm trying to implement a block GMRES procedure (i.e., GMRES to solve Ax=b, but with b that is not a vector but a n x r matrix, where r << n). My goal is to have a first implementation in Python ...
Pierre Beaujean's user avatar
0 votes
0 answers
46 views

I took interest on the project that someone was working on and in theory it should work but after putting it in code the results aren't as expected. The equation: k_i = (k_{i-1}+x_i)*const + 1 mod ...
actgroup inc's user avatar
1 vote
0 answers
106 views

I am trying to compute the dot product of a matrix in Matlab. The algorithms in each problem were generated using this website. To do so, I am required to use the function I created in the previous ...
L T's user avatar
  • 11
2 votes
3 answers
96 views

I have a dataset of binned events, corresponding to a cartesian coordinate set [[ 0. 0. 0. 0. 0. 0. 2. 5. 2. 3. 3. 0. 0. 0. 0. 0. 0. 0.] [ 0. 0. 0. 0. 0. 4. 10. 9. 7. 10. 6. ...
David K.'s user avatar
  • 529
1 vote
1 answer
63 views

I have a Vector, M, with size N and a Tensor, d, with size NxNxD. My aim is to perform the matrix multication M*d[i,:,:] for each i to get a new matrix with size nxD. Now I could just do it like this: ...
william paine's user avatar
0 votes
1 answer
74 views

I am making a small block builder with physics in Bevy, just for fun and for learning purposes. I guess my issue boils down to basically a math problem. I am trying to rotate the block placement ...
Olpan's user avatar
  • 1
2 votes
1 answer
75 views

X, Z, YT = sp.linalg.svds(W, k=353, which='LM') U = YT.transpose() @ np.diag(Z) @ X.transpose() Where W is a sparse CSR matrix of size (124956, 124956). The matrix multiplication to compute U takes a ...
liu's user avatar
  • 21
0 votes
0 answers
44 views

I have a problem which require lattice attack at some point to reduce work load but for most of use lattices are hard to understand. I have: k1 = (k0+x1)*const +1 k2 = (k1+x2)*const +1 k3 = (k2+x3)*...
Frank Mathews's user avatar
0 votes
1 answer
71 views

I have a 3x3 matrix, call it H, dependent on the parameters f, B. I then let f range from 0 to pi, and for each take the eigenvalues of H(f) using numpy's function: numpy.linalg.eig(). This gives me a ...
Christian's user avatar
1 vote
1 answer
81 views

I need to solve millions to tens of millions of independent 2-variable linear systems represented in augmented matrix form. The input consists of coefficient vectors A, B, C, A', B', C' (each ...
Huang WeiFeng's user avatar
1 vote
1 answer
75 views

I'm trying to implement a function in Python that reduces a square matrix to upper Hessenberg form using Givens rotations. I know that this should be possible Wiki and sometimes preferred over ...
ldro's user avatar
  • 11
4 votes
0 answers
96 views

I am trying to solve the equation, |λ²·A + λ·B + C| = 0, where lambda is a (possibly complex) scalar and A, B, and C are N x N matrices. The goal is to compute the roots of the characteristic ...
Aud's user avatar
  • 55
2 votes
0 answers
202 views

I am using cuDSS to solve a set of Ax=b equations as follows cudssMatrixType_t mtype = CUDSS_MTYPE_SPD; cudssMatrixViewType_t mview = CUDSS_MVIEW_UPPER; cudssIndexBase_t base = CUDSS_BASE_ZERO; ...
pk68's user avatar
  • 83
1 vote
1 answer
83 views

I have a matrix in Python consisting of 1s and 0s. As an example: m= [1 0 1] [1 1 1] [0 0 1] I would like to convert it to a matrix of symbols/strings. An example of the output I'm ...
BunnyKnitter's user avatar
0 votes
1 answer
110 views

I am trying to solve the generalized eigenvalue problem, Ax=bBx where A and B are m x m matrices and I am trying to find b (which is a number) in python. I have ran into a problem. I am using eigh ...
Alejandro Mercado's user avatar
0 votes
0 answers
62 views

As a preface this is not a question asking for code, I am simply seeking a process, or math formula. I'm working on a 2D game that has an isometric perspective to simulate a 3D world. The objects in ...
cino's user avatar
  • 1
0 votes
1 answer
64 views

Say I have three scaler components (Vx, Vy, Vz) of some value V, as well as the 2D location coordinates where these values exist (x, y). This is arranged in a pandas dataframe (df) such that the data ...
Nicole I.'s user avatar
0 votes
0 answers
40 views

I am working on my first project with Godot (and in Gamedev in general). I am now trying to configure animations for my character in an isometric 3d game. Inside of AnimationPlayerTree, I have an ...
Constantine's user avatar
0 votes
1 answer
64 views

I know this is a simple question, but I'm thrown off by some additions related to linear algebra problems being treated as constant time vs. linear time. In this case, I'm interested in summing m ...
Ari's user avatar
  • 103
-1 votes
1 answer
106 views

I would like to calculate the pitch angle of a camera ray vector that corresponds to an image point (u,v). This vector is moved to plant coordinate frame and named as Reflected_Ray vector. How to ...
Uce's user avatar
  • 73
2 votes
0 answers
100 views

How can i convert a camera space vector to world space, given the camera direction vector, and the camera space vector? All vecs are normalized 3D vectors, and the camera space projection is correct ...
Chase M's user avatar
  • 29
0 votes
0 answers
39 views

I'm looking for the fastest way to essentially predict a rotating n values using, effectively, the other n-1 features. I can conceptualize a way of doing this with a for loop and will explain it below....
Brandon Lewallen's user avatar
0 votes
0 answers
99 views

I'm using numba to compile some expensive calcualtion for signifcant performance gains - this is wonderful! Recently I made a small change to the calcualtion to extract some additional values (...
jpmorr's user avatar
  • 676
0 votes
2 answers
154 views

Multiplying a <- matrix(c(0,0,0,0), nrow = 2, byrow = TRUE) b <- matrix(c("b1","b2","b3","b4"), nrow = 2, byrow = TRUE) a %*% b gives Error in a %*% b :...
Det.Gibson's user avatar
0 votes
0 answers
96 views

I'm writing a code that mostly consists of matrices manipulation and, in particular, diagonalization. I already have a code, both in python and in Fortran 90 that are able to solve my problem in a ...
Felipe Flores's user avatar
0 votes
0 answers
81 views

I'm trying to resizing a rotated rectangle in html canvas. The direction of resizing is to east, so basically, the rectangle width must grow, while it mantains the height fixed. I achieved to do it in ...
Pedro Ferreira's user avatar
0 votes
0 answers
38 views

I tried to obtain the coefficients of B-spline matrix using the following code: function C_matrix = calculateBsplineCoefficientMatrix(s) % Number of input samples N = length(s); % Construct Alpha ...
Rohitashya Mitra's user avatar
3 votes
1 answer
169 views

I have a linear algebra problem that I can't find the correct function for; I need to find the vector x that satisfies Ax = b. Because A is non-square (there's 5 columns and something like 37 rows), ...
Arcaeca's user avatar
  • 281
1 vote
1 answer
89 views

I have an arbitrarily large integer k and an array of arbitrarily many positive prime numbers [p_1, p_2, ..., p_n]. Using JavaScript, I want to check if k can be expressed as a linear combination of ...
Lawton's user avatar
  • 261
0 votes
0 answers
125 views

I am new to auto-differentiation in Julia and have been trying to use Enzyme to compute the gradient of a custom function that involves a matrix inverse. I have come across the problem that Enzyme ...
L. Mann's user avatar
  • 143
2 votes
2 answers
115 views

I'm trying to calculate the weights for a finite-difference approximation of the first derivative f′(x)f'(x)f′(x) using the Taylor series expansion. I'm solving for weights a,b,c,d,ea, b, c, d, ea,b,c,...
Bhavninder Singh Virdi's user avatar
0 votes
0 answers
61 views

My code: https://jsfiddle.net/03t2wdrq/ // based on https://www.keithschwarz.com/interesting/code/?dir=lights-out var puzzle = []; var toggle = []; var solution = []; // initialize toggle matrix ...
TheDudeofDC's user avatar
0 votes
1 answer
72 views

I understand that in order to project a point in camera coordinate system (which is in 3d) onto image coordinate system (which is 2d), we need to use homogenous coordinates for the image coordinates ,...
Hui Liu's user avatar
  • 427
0 votes
1 answer
114 views

I attempted to use **pycddlib ** to find vertices in a polytope with Python. I followed the code in this post. Polytope, Python - find extreme points import numpy as np import cdd as pcdd A = np....
JohnLee's user avatar
0 votes
0 answers
60 views

I'm working on a project where I'm combining gyroscope data (which measures delta rotation) with AoA (Angle of Arrival) measurements (absolute angles in degrees) using a Kalman filter. The goal is to ...
d3dalo's user avatar
  • 11
0 votes
0 answers
61 views

I'm using SharpDX to perform Squad interpolation of quaternions, but the calculated results are not continuous. Here is the code. What is the issue, and how can I fix it? The following graph ...
user28782417's user avatar
1 vote
1 answer
128 views

Consider three (complex) square matrices A, X, and B, that form a generally underdetermined linear system A @ X - X @ A == B The system is to be solved for X. I would like to use, e.g., the lstsq ...
Ben's user avatar
  • 539
1 vote
1 answer
394 views

I have a grayscale camera for which I have already calculated intrinsic parameters with standard methods of calibrations. I have then position this camera in a particular stationary setup and put a ...
SimPer's user avatar
  • 29
1 vote
2 answers
214 views

I want to manipulate matrices of elements of the finite field GF(2), where every element is a 1 or a 0, in Python. I see that numpy can use dtype=bool, but it uses saturating addition, not wrapping, ...
Gavin Wahl's user avatar
  • 1,322
0 votes
0 answers
84 views

Consider three square matrices A, X, and B that form the linear system: A @ X = B to be solved for a particular solution X (which might not be unique). I know that the matrix B is a triangular matrix....
Ben's user avatar
  • 539
0 votes
0 answers
36 views

I'm working on a problem involving positioning in a 2D space and need some help understanding why my approach isn't always working. I have: An anchor located at the origin $(0, 0)$. A tag at an ...
d3dalo's user avatar
  • 11
3 votes
2 answers
52 views

I’m analysing the impact of a covariate on a dependent variable using aov to assess how much variation can be reduced by including said covariate. However, when I run the function, it automatically ...
nhaus's user avatar
  • 1,043
1 vote
1 answer
93 views

See below my attempt at implementing the block tridiagonal thomas algorithm. If you run this however, you get a relatively large (10^-2) error in the block TMDA compared to the np direct solve (10^-15)...
Tom Waits's user avatar
  • 135
4 votes
2 answers
173 views

I'm trying to find eigenvalues for a family of matrices (Hamiltonian with perturbation). Matrix is equal to sum of diagonal matrix "mat1", and another matrix "mat2" multiplied by a ...
martes's user avatar
  • 101

1
2 3 4 5
93