I am trying to traverse a list of Lists in L Shape. For example: lShapedTraverse [[1,2,3],[4,5,6],[7,8,9]] will result in [[1,2,3,6,9],[4,5,8
I'm traying to calculat the multiplication of tow matrix using OPENCL with C: ` #include <CL/cl.h> # include <stdio.h> # include <math.h> # in
I have this short code img_lab = rand(Lab, 10, 10) where I just have created an image of random colored pixels. Probably this question is trivial but how do I c
I have data in the form of: A=B=11 A=C=6 A=D=5 B=C=19 B=D=17 C=D=6 But I'd like to convert this into this format: graph= [[ 0, 10, 15, 20 ], [ 10,
I need to modify a matrix filled with random numbers so that the resulting matrix has a diagonal with the numbers 1 to 10 and everywhere else there are supposed
I'm a bit confused. A matrix A has 8 eigenvalues, some of them are complex, some are real. I want to copy only the eigenvectors that correspond to the real eige
I tried to pass my matrix from python to C++ based on ctypes to multiply by 2 but I could not get the result that I want because it says inf instead. C code (DL
I'm trying to find an easy, up-to-date way to plot transition matrices. Could someone please recommend a method or package? I found advice on Stack, but the pos
This problem was discovered when I was solving this second order differential equation by matlab syms x(t) diff(x,t,2)+k*diff(x,t)+b*x==0 I transform i
I am working with very large matrices (>1GB) but imagine that I have the following matrix: A = [1 1 2 2; 1 1 2 2; 3 3 4 4; 3 3 4 4] I need to
I need an Algorithm that I will use to scan pixels out from the center. Problem is with different lengths and sizes, it sometimes can't get to the position (See
#include<bits/stdc++.h> using namespace std; // Printing a matrix in spiral Order int main() { int n, m; cin>>n>>m; int arr[n][
I have a dataframe events with xy-coords of unique points. I have a dataframe all_nodes with xy-coords of network nodes. All points of events are also in all_no
Given a matrix like mat > set.seed(1) > mat <- matrix(rbinom(100,1,0.5),10,10) > rownames(mat) <- paste0(sample(LETTERS[1:2],10,replace=T),c(1:nr
I need to generate matrices of natural numbers in ascending order with zero (0), but they are very large ones and it will be hard to write them by hand. What I
Given a matrix object in R, it's easy to coerce it to a sparse matrix in triplet format: library(Matrix) m <- matrix(rbinom(100,1,0.5),10,10) m <- as(1*m,
i wrote this code where i have array of matrics(alpha_mom_DR_data_array), and in this array , there are matrics in different sizes , for each one i want to calc
I have a wide set of splines, and at each point (x,z) of these splines is associated to a field value. I need to map all these points and relevant field values
I am trying to compute the pseudoinverse of a matrix in C code. Specifically, I am trying to compute the Moore-Penrose pseudoinverse using singular value decomp
i have 2 file. analizeddata.txt: A001->A002->A003->A004 A001->A005->A007 A022->A033 [...] and matrix.txt: A001|Scott A002|Bob A003|Mark A004|