

stackoverflow.com
 20130421 13:00:41
 Similar
 Report/Block
I have the following data set.seed(11) Data<rbind(c(1:5),c(2:6)) Candidates < matrix(1:25 + rnorm(25), ncol=5, dimnames=list(NULL, paste0("x", 1:5))) colnames(Data)<colnames(Candidates) I want to subtract each row of my Data from each row of the Candidate matrix And return the minimal absolute difference So for row one I want to find...



stackoverflow.com
 20120330 21:19:55
 Similar
 Report/Block
> a<matrix(c(1:9),3,3) > a [,1] [,2] [,3] [1,] 1 4 7 [2,] 2 5 8 [3,] 3 6 9 > a[3,]*a[,3] [1] 21 48 81 > class(a) [1] "matrix" > class(a[3,]) [1] "integer" In R, 1dimensional matrix is changed to a vector. Can I avoid this? I would like to keep 1D matrix as a matrix. Actually, I need to...



stackoverflow.com
 20130422 16:12:13
 Similar
 Report/Block
In R, I want to multiply a 1x3 vector by a 3x3 matrix to produce a 1x3 vector. However R returns a matrix: > v = c(1,1,0) > m = matrix(c(1,2,1,3,1,1,2,2,1),nrow=3,ncol= 3,byrow=T) > v*m [,1] [,2] [,3] [1,] 1 2 1 [2,] 3 1 1 [3,] 0 0 0 The correct output should be a vector, not a matrix...




stackoverflow.com
 20120506 02:21:44
 Similar
 Report/Block
How can I list all of the results that used to occur when typing packageName<tab> , i.e. the full list offered via autocompletion? In R 2.15.0, I get the following for Matrix::<tab> > library(Matrix) > Matrix:: Matrix::.__C__abIndex Matrix::.__C__atomicVector Matrix::.__C__BunchKaufman Matrix::.__C__CHMfactor Matrix::._...



javaforums.org
 20120805 09:35:25
 Similar
 Report/Block
Hi All I'm trying to rewrite a snippet of code I've written using Matlab into java and hoping to enlist the help of some experts. The matlab code is; Code: A=[1,2,35,5,63,1.......] %some random vector dimension 1x100 B=reshape(A,10,10); %takes vector A and reshapes it (columnwise) into a 10x10 matrix C=B*B; %Multiplys the 10x10 m...



thestudentroom.co.uk
 20130611 23:38:55
 Similar
 Report/Block
When reducing a symmetric matrix A to its diagonal matrix D, what method do you use? I've read and understood the following procedure; i) Find normalised eigenvectors of A. ii) Form a matrix P with columns consisting of the vectors found in (i). iii) Find the transpose of matrix P iv) D = P But is it really necessary? We know the diagonal...



stackoverflow.com
 20120606 11:20:43
 Similar
 Report/Block
void inverse44( double *inverse, double *matrix double trans[3], trans_xf[3]; MTX3_t matrix3; inverse[0] = matrix[0]; inverse[1] = matrix[4]; inverse[2] = matrix[8]; inverse[4] = matrix[1]; inverse[5] = matrix[5]; inverse[6] = matrix[9]; inverse[8] = matrix[2]; inverse[9] = matrix[6]; inverse[10] = matrix[10]; inverse[15] = 1.0; inverse[1...




stackoverflow.com
 20120328 20:23:47
 Similar
 Report/Block
I have a matrix in R. Each entry is a score and the rownames and colnames are ids. Instead of the matrix I just want a 3 column matrix that has: score Right now I'm using nested for loops. Like: for(i in rownames(g)) { print(which(rownames(g)==i)) for(j in colnames(g)) { cur.vector<c(cur.ref, i...



thestudentroom.co.uk
 20130420 18:04:34
 Similar
 Report/Block
I know this is really simple but I'm extremely confused on finding the standard deviation on different sets of data. I looked on a past paper (there are no solutions) and this was a question: The module marks of 99 students are shown in the table below: x<30<40<60<70<100 f 94352130 Find the mean & standard deviation The mean isn'...



stackoverflow.com
 20120227 12:40:15
 Similar
 Report/Block
In MATLAB, I have a for loop which has a lot of interations to go through and fill a sparse matrix. The program is very slow and I would like to optimize it to see it finish some time soon. In two lines I use the command , and the editor of MATLAB, warns me that the use of logical indexing instead of will improve performace. My code...



thestudentroom.co.uk
 20130510 17:43:30
 Similar
 Report/Block
Question Let g(x, y) = (x^3)(y^2)(1 − x − y). Show that (0, 1) is a critical point of g(x, y) for which the Hessian matrix of g is singular. Find an approximation for g(x, y) to lowest nontrivial order in the neighborhood of the point (0, 1). Does g have a maximum or a minimum at (0, 1)? Justify your answer. So I have shown (0, 1) is a c...



theawesomer.com
 20120724 17:45:33
 Similar
 Report/Block
Neo has to hide out from Agent Bill Lumbergh as he comes around looking for the latest T.P.S. report in this amusing combination of two incredibly classic movies, both released in 1999. Hat Tip More Awesome Stuff for You to Click On: Scott Pilgrim x The Matrix Funny: The Matrix Pill Matrix No. 5 The Matrix Dance Everything is a Remix: The...




stackoverflow.com
 20120603 16:19:48
 Similar
 Report/Block
I'm useing a method in Java, but I want it in C# too. It is used for tell if a matrix of int is transitive or not. static boolean isTransitive(boolean[][] matrix) { for (int i = 0; i < matrix.length; i++) { for (int j = 0; j < matrix.length; j++) { if (matrix[i][j]) { for (int k = 0; k < matrix.length; k++) { if (matrix[j][k...



thestudentroom.co.uk
 20130421 22:58:49
 Similar
 Report/Block
If we're given a matrix and told to find the adjoint of the matrix (A, for example), can we simplify the matrix before finding co factors, etc?...



stackoverflow.com
 20120303 14:51:19
 Similar
 Report/Block
I'm trying to do k nearest neighbor KNN of the data points in "dat", so my first step is to construct a distance matrix between each point and all the other points, then for each point find the K nearest neighbor. The following code works perfect in serial without openmp. However, when I use openmp it gives a segmentation fault. I think t...



stackoverflow.com
 20130416 14:33:20
 Similar
 Report/Block
I have a fairly large sparse matrix that, I reckon, would occupy 1Gb when loaded into memory. I don't need access to the whole matrix at all times, so some kind of memory mapping would work; it doesn't seem to be possible, however, to memory map a sparse matrix using numpy or spicy (the tools I'm familiar with). It can easily fit into mem...



stackoverflow.com
 20130225 08:34:17
 Similar
 Report/Block
I was wondering how to fix my program which asks for user input on any number. To terminate the program, you input 99. Everything goes well as far as input goes, until I hit 99 to stop the program where it becomes the minimum. This is my code. The final answer for the minimum value cannot be 99. s = 99 n = 1 minimum = None maximum = N...



thestudentroom.co.uk
 20130520 16:59:42
 Similar
 Report/Block
Apply gaussian elimination without pivoting to find an upper triangular matrix U. Find a lower triangular matrix L such that A=LU. I have found U as but I never know where to go next in these kinds of questions. I've computed the Transpose for U, but that didn't work, and I've vaguely done the inverse but that seems to be another upper t...




stackoverflow.com
 20120428 12:55:18
 Similar
 Report/Block
here is topological sorting using DFS in c++,which has bugs(out of bound error) #include<iostream> #include<stdio.h> using namespace std; int count=0; static int *a=new int[8]; void dfs(int u,bool v[],bool matrix[][8]) v[u]=true; for(int i=0;i<8;i++) if(!v[i]&& matrix[u][i]) dfs(i,v,matrix); a[count++]=u; } i...



stackoverflow.com
 20120413 01:40:01
 Similar
 Report/Block
Considering following vector res and matrix team. the vector res represent indices, and I require to extract only those names whose index number is in vector res and gender="F". I need to do this in R and as I am a newbie to R, could not resolve this. [1] 2 12 16 5 6 19 17 14 9 4 names genders [1,] "aa" "M" [2,] "ab" "M" [3,] "al" "M"...



stackoverflow.com
 20090423 14:03:22
 Similar
 Report/Block
I've got MATLAB code inserting ndimensional points (n > 1) into a matrix ( myPointMatrix ) and am having thoughts about how to insert the first point. Right now the program checks the size of myPointMatrix before inserting a point. If it is 1x1, myPointMatrix is set equal to the current point. Otherwise the current point is appended. T...




thestudentroom.co.uk
 20130606 00:14:25
 Similar
 Report/Block
http://www.artofproblemsolving.com/F...o g.php?b=10579 I understand the proof of the corollary, however, why is it a corollary? That is, why does the corollary it follow from the lemma motivationally? The general question is: given a matrix, an arbitrary vector (x,y) it multiplies, and the result of that multiplication, is it possible to...



stackoverflow.com
 20120415 13:42:51
 Similar
 Report/Block
i'm tryin to do image rectification without calibration , just using fundamental Matrix and using OpenCV Here things that i've done till now : Find Matches between two images using SURF and FLANN Descriptor Matcher List good_match = getGoodMatch(img1,img2); > it's done , and the result is good Get Matching Point for img1 and img2 Get F...



stackoverflow.com
 20120310 21:35:57
 Similar
 Report/Block
There is a header file in GLKit with the following comment: GLKMatrixStack is a CFType that allows for the creation of a 4x4 matrix stack similar to OpenGL's matrix stack. Any number of matrix stacks can be created and operated on with functions similar to those found in fixed function versions of OpenGL. How would you go about generating...




thestudentroom.co.uk
 20130609 11:07:28
 Similar
 Report/Block
I understand that for matrices multiplication, you have to have something along these lines for it to work: (m * n) multiplied with (n * p) = (m * p) Where matrix one has m rows and n columns, matrix two has n rows and p columns, thus the resulting matrix has m rows and p columns. However, I've just read that you can multiply two 3 by 1 c...



stackoverflow.com
 20120330 15:49:22
 Similar
 Report/Block
I want to transpose a matrix in C, with as little memory use as possible. Therefore it is not an option to simply create a copy of the matrix, fill it in, and delete the other one afterwards. I thus want to do every swap on the matrix itself, with 1 temp variable to reuse. Matrix elements are indexed with pointer arithmetic, but as far as...



thestudentroom.co.uk
 20130325 11:03:16
 Similar
 Report/Block
When calculating the mean for results you have to round the mean either up or down depending upon the number of significant figures that you recorded your results in, right? So, for example, if you had results of 8, 8 and 9 and your mean was 8.3, you would round it down to 8 right? But then when you do standard deviation on the calculator...




stackoverflow.com
 20120322 22:12:56
 Similar
 Report/Block
I have a big sparse matrix. I want to take for all element in that sparse matrix. I try to use numpy.log() but it doesn't work with matrices. I can also take logarithm row by row. Then I crush old row with a new one. # Assume A is a sparse matrix (Linked List Format) with float values as data # It is only for one row import numpy as np...



stackoverflow.com
 20130318 18:53:25
 Similar
 Report/Block
Exist some easy fast way how to convert my sparse Matrix to MAtrix of doubles? Becous my Sparse matrix is not still sparse but dense, becouse of matrix products..... Other qeustion The Eigen library has the excellent performance, but I dont understand why, becouse there is onlyy .h files!!! no compile...



thestudentroom.co.uk
 20130422 15:58:02
 Similar
 Report/Block
I get that M has to be a 3*4 matrix with 2 linearly independent vectors= column space of M, and 2 linearly dependent vectors. To form the matrix M, I have to find the linear dependency using the Null Space of M so I end up with these 2 equations: where c1=column 1 of matrix M 3c1  c3 + 2c4 = 0 c1  2c2 + c4= 0 I then get c3 and c4 (the...




stackoverflow.com
 20120310 20:27:28
 Similar
 Report/Block
I decomposed a matrix on XNA and got the decomposed values, then just tried to create again the Matrix from those values and the resultant Matrix does not match the original one I tried to Normalize the quaternion I tried to generate a Rotation Matrix from the Quaternion I tried swaping the order of the Transformation SRT , STR, TRS,...



gamedev.net
 20130609 07:34:25
 Similar
 Report/Block
on windows/directx i have XMMATRIX. on ios i have GLKit and GLKMATRIX. i can't seem to find a hardware accelerated matrix library (for example on armv7 uses NEON extension for matrix multiply) for android that i can use on the C++/NDK side. anyone have any recommendations? thanks a bunch.



stackoverflow.com
 20120316 20:07:16
 Similar
 Report/Block
I'm making a project of Matlab (2011) which gives the user the possibility to filter an grayscale image (with convolution but without looking for edges) . I know for edges there is the [edge] function and I know that for some operators (like sobel) you can use [fspecial] to get the matrix. I found a matrix (or more than one) correspondin...




apktops.com
 20130606 07:45:14
 Similar
 Report/Block
Current Version: 1.7.1 Requires Android: 2.1 and up Category: Tools v1.7.1 update: v1.7.1 (Add) 2 new Point theme package ’Space’ and ’PinkyLove’, including 6 different point types. v1.7 (Add) New theme — ’Matrix’ –new floating theme, find it in Toucher Theme Settings (Add) Point theme –change the theme for Toucher Point, right now 2 m...



stackoverflow.com
 20120421 03:11:59
 Similar
 Report/Block
I have a sparse matrix in R I now wish to perform nonnegative matrix factorization on R data.txt is a text file i created using python, it consists of 3 columns where first column specifies the row number, second the column number and third the value data.txt 1 5 10 3 2 5 4 6 9 original data.txt contains 164009 rows which is data for 2500...



stackoverflow.com
 20130425 03:35:42
 Similar
 Report/Block
I should open with the fact that I am very new to c++. I am attempting to display a constantly updating 20x20 matrix of chars. Currently, I am displaying the the matrix using for loops as cout's (code below) but that is incredibly flickery I'm looking for something smoother. Is there a way to convert this char matrix into an image and di...




cyberforum.ru
 20130514 16:47:32
 Similar
 Report/Block
Код: public double[,] Method(double[,] matrix, int n) //1 int k = 0; for (int i = 0; i < n; i++) for (int j = 0; j < n + 1; j++) if (matrix[i, 0] != 0) k = i; break; //2 for (int i = 0; i < n; i++) double h = matrix[0, n]; matrix[0, n] = matrix[k, n]; matrix[k, n] = h; //3 double value = matrix[0, 0]; for (int i = 0; i < n;...



cyberforum.ru
 20130320 15:16:24
 Similar
 Report/Block
Доброго времени суток. Пишу программу, реализующую простые матричные операции (сложение, вычитание и прочее). Код: matrix.h Код: class matrix private: double **entries; int dim; public: matrix(int); ~matrix(); void set_e(int, int, double); int get_dim(); double get_e(int, int); matrix add(matrix A, matrix B); matrix.cpp Код: #inclu...



cyberforum.ru
 20130430 13:20:57
 Similar
 Report/Block
Не могу разобраться с умножением матриц Выдает либо числовой мусор, либо просто нули... Вот код: Код: #include #include #include #include // enum {max_size=10}; struct Matrix { double coef[max_size][max_size]; int sx, sy; }; void CreatMatrix(Matrix &m, int a, int b); void PrintMatrix(const Matrix &); void SummMatrix( const Matrix & m...




cyberforum.ru
 20130605 22:52:06
 Similar
 Report/Block
Здарвствуйте, помогите с задачей: Имеется класс, создающий двумерный массив, в этом классе нужно реальзовать метод перегружающий () для того, что бы можно было доставать элемент из массива по его индексу [строка][столбец] Код: #ifndef _MATRIX_H_ #define _MATRIX_H_ #include #include #include using namespace std; class Matrix int **A, m, n...
