In mathematics, a matrix (plural matrices) is a rectangular array of numbers, symbols, or expressions, arranged in rows and columns. The individual items in a matrix are called its elements or entries.

**1**

vote

**1**answer

55 views

### Convert vector A into matrix M at values from vector B

I have two vectors. Vector "A" is mx2. The first column contains continuous timesteps and the second column data from a measurement series.Vector "B" is a nx2 (1<n<m) and contains several ...

**0**

votes

**2**answers

73 views

### Symmetric matrix, value into c++ vector

I am trying to solve the following problem. Let's say I have a symmetric matrix with size n. I want to take all the "important values", and store them into a vector. Let me give an example to explain ...

**1**

vote

**0**answers

33 views

### Error: non conformable argument while matrix multiplication [duplicate]

I have a matrix multiplication problem in a chain format. I only have a input Matrix A, will save Matrix B <- Matrix A. Need to multiply in the below fashion. A * B=CB * C=DC * D=ED * E=...

**0**

votes

**2**answers

71 views

### How to resolve warning 'double *' differs in levels of indirection from 'double (*)[4][4]'

I am trying to calculate eigenvalues of a matrix using a downloaded tqli algorithm. As a simple example I am trying to test it for a 4x4 identity matrix:double ze[4][4];double *zepointer;ze[0][0]=...

**-1**

votes

**0**answers

16 views

### What do I do with the output of a projection matrix?

I am currently using a coordinate system where -1 is left and 1 is right on the X axis, and where -1 is down and 1 is up on the Y axis. When I multiply with my projection matrix, I just take the ...

**0**

votes

**2**answers

83 views

### Algorithm to find # elements less than target in a sorted Matrix in O(n)?

Design an algorithm that outputs the number of entries in A that are smaller than or equal to x. Your algorithm should run in O(n) time.For example in the array below if my target was '5' then I ...

**-1**

votes

**3**answers

30 views

### Open and display txt matrix in python and select specific part

I really new in Python and as my first task I would like to import a text file in Python. The file contains a matrix of m*n elements.After importing the text I would like to display the whole matrix ...

**2**

votes

**3**answers

82 views

### Calculate nth power of a matrix

I'm trying to optimize my code to calculate the nth power of a matrix. Before I would just call multiplySquare n times but that was way too slow. The problem is, it builds just fine but when I run ...

**-3**

votes

**1**answer

23 views

### EIGEN C++ Cannot Inverse MatrixXd

I'm tried run this code below and the inverse was done allright:#include <iostream>#include <Eigen/Dense>using namespace std;using namespace Eigen;int main(){Matrix2d A;A &...

**0**

votes

**0**answers

11 views

### R - Reticulate won't convert numpy array to matrix

In R using Reticulate I create a numpy array like so:> library(reticulate)> np$array(c(1,2,3))[1. 2. 3.]However, I cannot convert it back to a vector.> py_to_r(np$array(c(1,2,3)))[1. ...

**-1**

votes

**1**answer

36 views

### Sorting a string matrix java

Hello guys I have written a code https://pastebin.com/U3G1yBipimport java.io.*;import java.util.*;public class PlayerRanking {public static void main(String[] args) throws Exception {...

**0**

votes

**0**answers

15 views

### How to calculate design matrix and Hat matrix of a Cubic spline model in R?

I have a data set with y ~ x. It got 8000 observations. I want to compute the Hat matrix of the cubic spline. I proceeded to fit a cubic spline via smooth.spline function. I wish to tune the lambda ...

**-1**

votes

**0**answers

8 views

### Comparing two fasta files and score it in matrix form using python

let fasta.1 files for seq 1 compare to fasta.2 file seq 1 > 2 > 3 > 4... and seq 2 of fasta.1 compare to fasta.2 seq 1,2,3,4. using loops like comparing1: 1 , 1: 2, 1: 3, 1:4...and 2:1, 2:...

**0**

votes

**1**answer

25 views

### QtCreator C++ : 2D matrix gives different results in different member function of the same class

recently I have been working on a two dimensional maze creator that creates a maze from a 2D matrix. And I used a boolean matrix with 1 representing a maze room, everything works fine but for some ...

**-3**

votes

**0**answers

20 views

### Serialization of a Vector c++ [on hold]

I am new to C++, Can anyone tell me how to serialize (and deserialize) a vector of vectors containing doubles to a file in hard disk. Size of the matrix is 3000 x 3000. I have generated the matrix and ...