matrix

Rotation & OpenGL Matrices

I have a class that holds a 4x4 matrix for scaling and translations. How would I implement rotation methods to this class? And should I implement the rotation as a separate matrix? ...

SSRS - OutOf MemoryException - is there a limit to the number of rows that can be displayed

I have created an rdl doc that points at a proc that returns 90 000 rows and I am getting an out of memory exception. Is there a limit to how many rows the report projects can handle? Currently I have changed the proc that drives my report to just do a select Top 90 000. My specs are to be able to create a report with 120 000 rows. M...

Floating Point errors in Colt Java matrix libraries

How do I avoid floating point errors in financial calculations performed with Colt matrix libraries? ...

OCR: How to find the right ColorMatrix to define new colors?

Hi, I'm stuck right now with defining the dimension of each line. The list I want to scrape has various colors in it, and what disturbs me the most a selection: http://img18.imageshack.us/img18/210/lobbymd9.jpg As you can see the picture I try to analyze got a white background with green text. The selection background is grey with bl...

Can someone explain this example of deleting elements from a matrix in MATLAB?

The following example appears in the MATLAB tutorial: X = [16 2 13; 5 11 8; 9 7 12; 4 14 1] Using a single subscript deletes a single element, or sequence of elements, and reshapes the remaining elements into a row vector. So: X(2:2:10) = [] results in: X = [16 9 2 7 13 12 1] Mysteriously, the entire 2nd ro...

Reading a Matrix txt file and storing as an array

Greetings everyone, new to the forums :) I'm currently writing a Simulated Annealing code to solve a traveling salesman problem and have run into difficulties with storing and using my read data from a txt file. Each row & column in the file represents each city, with the distance between two different cities stored as a 15 x 15 matrix:...

Looking for actively maintained matrix math library for php

Does anyone know where I might find a PHP matrix math library which is still actively maintained? I need to be able to do the basic matrix operations like reduce, transpose (including non-square matrices), invert, determinant, etc. This question was asked in the past, then closed with no answers. Now I need an answer to the same questi...

Adding Matrices in C#?

I'm trying to add two matrices together in C# using some simple for loops. I store the results in a data grid view. However, the last cell does not seem to add. I've been looking at this code for a while now and can't seem to figure it out. Did I do something wrong? // Adds two matrices together using arrays. private void menuIt...

Assistance Needed with Java Colt Matrix Package

Can anyone tell me how you can delete columns from a matrix using the Colt library? TIA. ...

Using 3d transformation matrices

In an AI class we have a robot that has an arm with 7 joints. Each joint can rotate a different direction. I need to know where the very end is going to be. I've been trying to do 3d matrix multiplication and it works for one joint but once I add in another it doesn't line up with a model I made using the Java3D api. This is how I'm ...

What does matrix*vector mean in contrast to vector*matrix

if I do positionVector*worldMatrix the position is transformed into world space. But what happens if I do it the other way around (worldMatrix*positionVector) in terms of 3d space? I noticed the result is different to the first one. I already googled about matrix, math they explain a lot but not this one, at least I couldn't find it. ...

Matrix operations to enumerate all paths through n-partite graph

I have an n-partite (undirected) graph, given as an adjacency matrix, for instance this one here: a b c d a 0 1 1 0 b 0 0 0 1 c 0 0 0 1 d 0 0 0 0 I would like to know if there is a set of matrix operations that I can apply to this matrix, which will result in a matrix that "lists" all paths (of length n, i.e. through all the partit...

How to handle a translation Matrix in an inverted Y axis point of view

My usercase is an iphone application where I do an animation on the scale, rotation and translation of an image. So, I concat everything and feed it to the transform property, but there is one problem: Since my images vary in size, it is a problem to position them correctly. I'm used to an inverted y axis coordinate system, so I want m...

Matrices of Matrices within Perl

In a Perl script I'm working on, I need to build a matrix out of several other matrices. I've looked at a couple of modules in CPAN (Math::Matrix, PDL::Matrix, Math::Cephes::Matrix), but none of these seem to support this. In Octave, this is very easy. Here's an example of something similar to what I'm trying to do: octave:1> A = [ 1, ...

A proper way to create a matrix in c++

I want to create an adjacency matrix for a graph. Since I read it is not safe to use arrays of the form matrix[x][y] because they don't check for range, I decided to use the vector template class of the stl. All I need to store in the matrix are boolean values. So my question is, if using std::vector<std::vector<bool>* >* produces too mu...

A simple algorithm for generating positive-semidefinite matrices

I want to generate positive random semi-definite matrices. I am looking for an algorithm or more preferably an simple implementation of the algorithm in C, matlab, java or any language. ...

OpenGL Projection Matrices

I have a question on taking a viewer and their projection plane and how exactly to calculate the projected point that should be created. EX. Viewer at the origin, looking in the negative Z direction. Projection plane at z = -2. Point (-6,1,-4). I have seen some websites talking about using similar triangles and some that have a matrix ...

How do i print the columns of a JAMA matrix?

I use the JAMA.matrix package..how do i print the columns of a matrix ...

Efficient Line Drawing In Direct3D (Transformation2D?)

Background: I'm using the SlimDX C# wrapper for DirectX, and am drawing many 2D sprites using the Sprite class (traditionally from the Direct3DX extension in the underlying dlls). I'm drawing multiple hundreds of sprites to the screen at once, and the performance is awesome -- on my quad core, it's using something like 3-6% of the proce...

How to rotate, scale, and translate a matrix all at once in C#?

Okay, this is something that should be a simple matrix question, but my understanding of matrices is somewhat limited. Here's the scenario: I have a 1px by 1px sprite that I want to scale by some amount x and y (different amounts on each side), and then I want to rotate that sprite by some angle, and then I want to be able to precisely...