Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
31 views

I do apologise if this is an incredibly dumb question, because I know it is, I have no experience with colour matrices and the information I can find online to learn about them is unhelpful at best ...
Tojie Akida's user avatar
1 vote
1 answer
53 views

I am doing an assignment on matrices and gradients, where the final answer must be expressed as a row vector. vr = np.array([1, 2, 3]) vrr = np.array([[1, 2, 3]]) Mathematically, a row vector should ...
Louis Chua's user avatar
0 votes
0 answers
39 views

I am trying to determine an angle of rotation dynamically within an animation for each frame. The object is only rotating on its Z axis and after some research I found that the best method is probably ...
Connor R's user avatar
3 votes
0 answers
98 views

I want to plot all the diagonals of a matrix. In the matrix row 1 contains information of time 1, row 2 of time 2 etc etc. Each diagonal presents the evolution of the number of fishes in a cohort that ...
Claris's user avatar
  • 31
2 votes
2 answers
135 views

Short version: How do I vectorize two matrices A and B by column so that I can pass the 1st, 2nd, ..., ith column of A and the 1st, 2nd, ..., ith column of B to a function without a loop? I have two ...
pimple's user avatar
  • 358
0 votes
1 answer
167 views

I'm trying to convert a SAS program into a R one and I have stumbled at the for() loop and array part. It keeps saying in the log: "Error in for (. in i) seq_len(NBR_LIGNES_MAX) : 4 arguments ...
Simon O.'s user avatar
2 votes
0 answers
88 views

I am trying to learn C, and I want to specifically work with arrays and matrices as I do scientific simulations (coming from python!!). After writing few basic 1-D array codes in C, I am going for ...
Sayantan4796's user avatar
1 vote
2 answers
168 views

I am trying to perform 2D matrix processing (convolution) by applying a kernel/filter to a large matrix. There is a built-in function convolve that can perform convolution. It offers three different ...
Glory2Ukraine's user avatar
2 votes
0 answers
57 views

I have a self-hosted setup consisting of: Matrix Synapse (home server) LiveKit (for media routing) LiveKit SIP (for PSTN connectivity) Element client ✅ Working setup Element → Element calls work ...
Rahib Rasheed's user avatar
0 votes
1 answer
65 views

I am using transformation matrices with jspdf to change the origin and scaling of my drawings. setCurrentTransformationMatrix has no official documentation from what I found (well, except if "...
Alphasaft's user avatar
  • 322
3 votes
7 answers
243 views

I want to use a spreadsheet to take a column of rankings and turning into a pairwise matrix. Suppose I had a column like so: Candidate Ranking A 1 B 5 C 3 D 2 E 4 I want to create a 5x5 matrix where ...
James Cleveland-Tran's user avatar
2 votes
1 answer
200 views

I have the following numeric matrix in MATLAB: A = [3 2 7; 9 1 4; 5 6 8]; I want to sum all elements that are greater than 5 and are also even. I need to do this without using a loop, and store the ...
Nar.hhs's user avatar
  • 68
3 votes
6 answers
265 views

I want to take a vector of some length and arrange it sequentially as the off-diagonal elements of a square matrix (as I want the diagonals to all be 0), using only the default R packages. I can make ...
kacorn's user avatar
  • 33
1 vote
1 answer
146 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
2 votes
2 answers
168 views

I have an algorithm which involves generating a random square matrix and then inverting it. To avoid the program interrupted by numerically singular matrix, I wish to do something like the pseudo-code ...
Asigan's user avatar
  • 167
8 votes
3 answers
1k views

I am trying to solve the problem posed in this question. Here the OP asks that given a 15 element set, its 2^15 element power set be generated in a manner such that the elements of the power set are ...
uran42's user avatar
  • 469
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
1 vote
1 answer
95 views

I'm working with Julia's Symbolics.jl and I'm trying to compare two symbolic matrices. However, since Symbolics.isequal function checks for structural- instead of mathematical-equivalence it is ...
haifisch123's user avatar
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
1 vote
0 answers
46 views

I want a webgl canvas that I can seemlessly translate, rotate and scale with multitouch (using touch events). So far I have a canvas that I can translate with 1 finger or scale with 2 fingers, but I'm ...
laskisami75's user avatar
2 votes
1 answer
223 views

I am working on my computer organization lab and trying to figure out how to make my matrix transpose more efficient for 64 by 64 integer array. For a cache configuration with 32 direct mapped sets ...
Lasha Ghurtskaia's user avatar
1 vote
0 answers
77 views

I’m replicating Shapiro & Watson (1988) and need to impose the long-run restriction with a Givens rotation. The target identity is C_inf@B=C_inf(P@Q_total)=(C_inf@P)@Q_total=A@Q_total Yet my code ...
samuele ridolfi's user avatar
1 vote
2 answers
67 views

Can someone explain me a special PDF matrix transformation? I just can't figure it out. I have the following content stream of a PDF: q q 1.0000 0.0000 0.0000 1.0000 0.0000 0.0000 cm q 1 0 0 -1 0 841....
tombo_189's user avatar
  • 516
0 votes
1 answer
43 views

Sharing a common DolphinDB use case and solution for data processing. How to implement a script in DolphinDB to perform sliding window calculations on a vector at equal intervals? For example, ...
saki's user avatar
  • 319
4 votes
3 answers
97 views

Say I have this matrices: emp <- matrix(nrow = 13, ncol = 13) emp2 <- matrix(nrow = 13, ncol = 13) emp[lower.tri(emp)] <- 2 emp2[lower.tri(emp)] <- 3 And I want to combine them so below ...
Daniel Estévez's user avatar
-2 votes
1 answer
94 views

The "Introduction to R" chapter 5.4.1 states: The precise rule affecting element by element mixed calculations with vectors and arrays is somewhat quirky and hard to find in the references. ...
robertspierre's user avatar
3 votes
1 answer
88 views

I'm a total beginner in "R". I'm doing a science research work, and I need to translate a R code (package) into Python (or C++, or whatever). I need help to understand what the matrix ...
Gorgo Treize's user avatar
0 votes
0 answers
66 views

I have large files (38 GB minimum) that contain data matrices of size (nRows, nCols, nFrames). I want to open and evaluate portions of these files. I'm interested in the most efficient way to do this. ...
Scotty Gilmore's user avatar
2 votes
0 answers
128 views

I'm developing a backtracking function to solve a maze given by a matrix of 0 and 1. The problem is that, for small matrices, it correctly finds the shortest path, but for matrices 15x15 or larger, it ...
Ingenieria Vichi's user avatar
0 votes
1 answer
111 views

I am using X-files to store 3D models. I want to take rotation from X-file. In X-file rotation is represented by quaternion. I am using DirectX 11 and left-handed coordinate system. I want to create ...
HardCoder's user avatar
3 votes
2 answers
180 views

I am currently working on a number of animal teeth stored as surface meshes in R. Some of the variables I am looking at may be influenced by the number of cusps on the tooth and I would like to try ...
user2352714's user avatar
1 vote
1 answer
230 views

I am creating a matrix with three categorical columns: Group1, Group2 and Group 3, and one numeric column. What I need is to turn off the subtotals for columns Group 2 & Group 3, and only keep the ...
DatamineR's user avatar
  • 9,680
0 votes
1 answer
101 views

Objective To create a function in R {base} that produces a square matrix showing concatenated game results between players. The matrix should display the result of each pairwise match, concatenating ...
clp's user avatar
  • 1,602
2 votes
1 answer
62 views

As we know input makes the inputs to string. How can I take matrix like this ([[1,2],[3,4]]) from input() by user and have it like a normal 2D list to do some thing on it. It should be like that data =...
S.A's user avatar
  • 23
4 votes
2 answers
184 views

Intro Consider a tournament with four players and the following schedule: Rd 1: 1-4, 2-3. Rd 2: 4-3, 1-2. Rd 3: 2-4, ---. The usual way to display tournament results is the cross table, for example: ...
clp's user avatar
  • 1,602
0 votes
1 answer
53 views

I'm using glm_project from cglm to project a 3D world position to screen space. The code mostly works, but when I rotate the camera, the projected screen position moves in the opposite direction. Here'...
iamwhosiam's user avatar
1 vote
1 answer
207 views

Let's assume there is an event and within this event there are multiple outcomes that can co-exist. An example would be a tennis game where A plays against B and B serves. A couple of possible ...
HJA24's user avatar
  • 406
1 vote
2 answers
126 views

I have a world space position named P. I want to compute its corresponding position in another space named let's say "L". L is made of two components: The world space position of its ...
TheChamp's user avatar
0 votes
1 answer
86 views

Can someone explain to me please why B = diag(-2*ones(m,1),0) + diag(ones(m-1,1),-1) + diag(ones(m-1,1),1) takes 1,22 s. While A = diag(-2*ones(1,n)) + diag(ones(1,n-1),1) + diag(ones(1,n-1),-1) ...
Katpton Liamfuppinshire's user avatar
1 vote
1 answer
80 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
108 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
1 vote
1 answer
44 views

I have the following exercise involving 2 matrices – the first being ‘Equipment available to four leagues’, the second being the ‘teams per league’ (i.e, two teams per league). Note, there is ...
user23487612's user avatar
0 votes
0 answers
263 views

When trying to check the availability of usernames at the matrix.org server using the Matrix protocol with the following command curl -H "Content-Type: application/json" -X GET "https://...
LiterallyCode's user avatar
6 votes
2 answers
118 views

Numpy has many nice features for formatted output, but something I miss is the ability to print more than one array/matrix on the same line. What I mean is easiest to explain with an example. Given ...
Gaslight Deceive Subvert's user avatar
1 vote
1 answer
40 views

I am trying to find the determinant of a 4x4 matrix using nested list operations. I gave the following code def determinant_4x4(matrix: list[list[int|float]]) -> float: # Your recursive ...
Shreyas Mishra's user avatar
0 votes
0 answers
41 views

I'm running a MATLAB script on macOS that performs sensor fusion using GNSS and IMU data. The script runs perfectly in MATLAB R2024 but fails in MATLAB R2022 with the following error during the ECEF ...
Vims's user avatar
  • 1
1 vote
1 answer
66 views

I'm working with networks like these: mat1 <- matrix( c( -1, -1, -1, 0, 0, 1, -1, -1, 0, 0, 1, 1, 0, -1, -1, 0, 0, 1, -1, 0, 0, 0, 1, 0, -1 ), nrow = 5, ncol = 5, byrow = ...
Hard_Course's user avatar
0 votes
1 answer
49 views

I am new in this stuff, I am currently working in a school project about a matrix calculator, I want to enter the two matrix and that when I click a button the solution of the operation gets printed. ...
Rachel's user avatar
  • 1
0 votes
0 answers
35 views

I have prepared simple code. I need to verify firstframe_center_point by using inverse second_frame_matrix and secondframe_center_point,however, there is a small mistake in my way. I have simply ...
Özgür Kurt's user avatar
1 vote
1 answer
79 views

I'm using this: (ma:ident(3),ma[1,1]:%i/2,ma[1,3]:sqrt(3)/2,ma[3,1]:sqrt(3)/2,ma[3,3]:-%i/2,ma); It gives a 3x3 matrix which I expect to be unitary. But when trying to test it by using is(ma,(unitary)...
user158293's user avatar

1
2 3 4 5
826