# matrix

• ## Unable to convert between 1d and 2d array values2019-01-25

I realize this problem and solutions are all over StackOverflow like here however I'm still unable to make this work. Most of the examples say that I just need to multiply the row by the width and add the column meaning the location (4, 3) in a 4x4 s

Tags: java, arrays, matrix
• ## calculate bearing of several locations from several locations in R2018-08-24

I have a dataset with 519 islands. I have calculated the distance between each island using rdist.earth and got a nice 519:519 Matrix. I have a subset of the islands (78) that have particular threats on them that could get to the other islands. I nee

• ## Converting this C++ code to Matlab2018-08-12

I'm trying to convert a straight-forward C code to matlab but I got stuck in something that seemed to be quite clear at first. What's this segment doing? SIZE_N2 = 25, w = 533, h = 800 //Init the L matrix. L is a sparse matrix that only contains SIZE

Tags: matlab, matrix, sparse
• ## Addition of two matrix using loop 2018-06-20

These are my two matrices in four arrays: Array (  => Array (  => 1  => 2 )  => Array (  => 4  => 5 ) ) Array (  => Array (  => 1  => 2 )  => Array (  => 4  => 5 ) ) How can I add up

Tags: php, matrix
• ## lower triangular matrix give wrong answer when 02018-06-06

I've been working on this code for get the lower triangular matrix for solving linear equations, here's the code: int jordan (){ float fracc=0; int z=0; fila=0; colum=0; for(colum=0;colum<cant;colum++) { buscar_ceros(); /*here we call*/ for(fila=colu

Tags: matrix, gaussian
• ## on symmetric positive semi-definiteness of covariance matrices in matlab2018-03-29

Hi everybody I have this problem: I have Dataset of n vectors each has D dimensions. I also have a covariance matrix of size D*D, Let It be C. I perform the following action: I choose K vectors from the dataset, and also choose E dimensions randomly.

Tags: matlab, covariance, matrix
• ## Inverse Matrix (Numpy) int too large to convert to float2018-03-16

I am trying to take the inverse of a 365x365 matrix. Some of the values get as large as 365**365 and so they are converted to long numbers. I don't know if the linalg.matrix_power() function can handle long numbers. I know the problem comes from this

• ## Check element wise equality of a 3D matrix Matlab2017-11-09

I have a 3D matrix say for eg. A(10x5x8). I need to get a 2D matrix (Boolean) out of it of size 10x5. True if its elemental 3 Dimensional values are all same. i.e. Result(1,1) = 1 if A(1,1,1) == A(1,1,2) == A(1,1,3) etc.. False if at least one is dif

Tags: matlab, matrix, vectorization
• ## Trying to write a Java program to encrypt and decrypt a ADFGVX cyphir, finding it confusing2017-08-24

I need to be able to encrypt and decrypt a message using a Polybius Square, I know how this works on paper but dont know where to start when turing it into a program. I was planning to use a hashmap but I was told thats a bad way to go about it and t

• ## How to make a giant matrix in C2017-07-10

I'm trying to define a matrix in C with 100,000 columns and 100,000 lines of boolean type (bool matrix), how I do that? --------------Solutions------------- On a technical note, a definition is quite different to a declaration. I figu

Tags: matrix
• ## How to write this matrix in matlab,2016-10-09

I want to write this matrix in matlab, s=[0 ..... 0 B 0 .... 0 AB B .... 0 . . . . . . . . . 0 .... A^(n-1)*B ... AB B ] I have tried this below code but giving error, N = 50; A=[2 3;4 1]; B=[3 ;2]; [nx,ny] = size(A); s(nx,ny,N) = 0; for n=1:1:N s(:,

Tags: matlab, matrix
• ## create a matrix from array of elements under diagonal in numpy2016-10-05

I would like to create a matrix using a list whose elements would be the elements of the matrix under the diagonal. import numpy as np x1 = np.array([0.9375, 0.75, 0.4375, 0.0, 0.9375, 0.75, 0.4375, 0.9375, 0.75, 0.9375]) x1 the matrix I would like t

Tags: python, arrays, matrix, numpy, vectorization
• ## sum of independent rows of a data frame in an escalating way2016-08-12

I have a data.frame that is 100x100 and I need to sum them up as an escalator. Starting with the first entry of the first column and then keep adding the first entry of the second column to the second entry of the first and so on until the the last e

Tags: matrix
• ## using reshape for a mean in a 3D matrix2016-05-04

I have a 3D (x,y,nframes) matrix/ movie ( named ch), and a logical mask (x,y). I want to do the mean of the mask pixels in each frame , at the end I get a vector of dim 1xnframes. And I want to do it with the reshape instead than frame by frame, but

Tags: matlab, matrix, vectorization
• ## Reading a matrix from a text file in c2015-11-08

I´m trying to read a text file and store the data in a matrix. I print the results after read each line and seems it is working, but if I print the matrix at the end, I don't have the same results. I can't find what i'm doing wrong! int main() { int

Tags: text files, arrays, matrix
• ## Sorting a 3D matrix by only the first row MATLAB2015-09-30

I am having trouble sorting a 3D matrix by whichever row I want, but still having the other two columns match up with the one sorted row. ex)before sort: 5 4 1 4 6 3 9 6 5 after sort: 1 4 5 3 6 4 5 6 9 So only the first row got sorted in ascending or

Tags: matlab, sorting, matrix
• ## python determinant of a large matrix2015-07-29

I have a linear system of equations like MX=N. M is a 21x21 matrix with many elements zero. When I try to solve this system with X = np.linalg.solve(M, N), it gives me this error: numpy.linalg.linalg.LinAlgError: Singular matrix The problem here is t

• ## Variable not initialising java 2015-03-23

On line 38 - pool.submit(new Multi(N,i,j,a,b,c)); i have a variable j which is not initialising. Im not sure whats wrong as all others have initialised, this has been bugging me for the past hour. Please could someone help me fix this error. public c

• ## How can I print a multidimensional array in Perl?2015-03-19

I am trying to print a multidimensional array (matrix) in Perl passing reference to array to subroutine. Here is my code: sub print_matrix(\@) { my \$array = shift; for my \$i ( 0 .. \$#{ \$array } ) { my \$row = \$array[\$i]; for my \$j ( 0 .. \$#(\$row) ) {

Tags: perl, arrays, printing, matrix
• ## How can I extrapolate the transformation matrix from a MeshLab project file containing two aligned meshes?2015-03-17

I have two meshes: mesh A and mesh B. I'm working with MeshLab and all I need is to align them and then extrapolate a transformation matrix that brings B on A. When I use the alignment tool, I glue A and I set it as the base mesh. Then I perform the

Tags: matrix, alignment, mesh, meshlab

Copyright (C) dskims.com, All Rights Reserved.

processed in 2.606 (s). 9 q(s)