matrix

Octave: importing a large matrix in csv format

I'm trying to import a matrix (about 80.000 rows) from a csv file to Octave. The obvious solution seems something like: load("-ascii","relative_directory/the_file.csv") or maybe renaming the file and trying: load("-ascii", "relative_directory/the_file.txt") Yet I keep getting the error: load: failed to read matrix from file "...

Where to learn about matrices?

I am programming in Ruby and have wanted to learn about matrices but I can't find any resources for actually learning about them. Are there any good tutorials on matrices and programming? It would be nice if it would be in ruby but other languages are fine too. ...

transpose for 8 registers of 16-bit elements on SSE2/SSSE3

(I'm a newbie to SSE/asm, apologies if this is obvious or redundant) Is there a better way to transpose 8 SSE registers containing 16-bit values than performing 24 unpck[lh]ps and 8/16+ shuffles and using 8 extra registers? (Note using up to SSSE 3 instructions, Intel Merom, aka lacking BLEND* from SSE4.) Say you have registers v[0-7] ...

F#: how to create matrix of elements of any other type except Double

I'm a beginner in F#. I know that there is the way to create Double Matrix using PowerPack.dll: let B = matrix [ [ 1.0; 7.0 ]; [ 1.0; 3.0 ] ] How can I create matrix with elements of my own type (for example with [,] instead of Double), so it would look like: let B = matrix [ [ [1,2]; [3,4] ]; [ [7,8...

how to displaying pivot in matrix reporting service?

Dear All, I have problem relating to pivot query and matrix reporting. I don't know how to display it on matrix reporting service so it will dynamic column. Can any body help me to show how to configure the matrix table? or could you give the link where can I find the answer of my problem? I'm newbie in reporting service. ...

Functional way to get a matrix from text

I'm trying to solve some Google Code Jam problems, where an input matrix is typically given in this form: 2 3 #matrix dimensions 1 2 3 4 5 6 7 8 9 # all 3 elements in the first row 2 3 4 5 6 7 8 9 0 # each element is composed of three integers where each element of the matrix is composed of, say, three integers. So this example should...

Which euler rotations can I use ?

I have two Cartesian coordinates. There are xyz and BIG XYZ. I want to make these are parallel to each other. For example, x paralel to X ,y parallel to Y and z paralel to Z. I use a rotation matrix but I have a lot of different rotation matrices. For example I have 3D point in xyz Cartesian coordinates and it's called A and I want ...

iPhone: How to use CGContextConcatCTM for saving a transformed image properly?

I am making an iPhone application that loads an image from the camera, and then the user can select a second image from the library, move/scale/rotate that second image, and then save the result. I use two UIImageViews in IB as placeholders, and then apply transformations while touching/pinching. The problem comes when I have to save bo...

make a 3D spotlight cone matrix

How to create the transformation matrix (4x4) that transforms a cylinder (of height 1 and diameter 1) into a cone that represents my spotlight (position, direction and cutoff angle) ? --edit-- In other words: how to draw the cone that represents my spotlight by drawing a cylinder through a suitable transformation matrix. --edit2-- The ...

Calculations in a table of data

I have a table of data with survey results, and I want to do certain calculations on this data. The datastructure is somewhat like this: (ignore all the data beeing similar, i cut and pasted all the rows) ____________________________________________________________________________________ | group |individual | key | ...

Is there a transformation matrix that can scale the x and/or y axis logarithmically?

I'm using .net WPF geometry classes to graph waveforms. I've been using the matrix transformations to convert from the screen coordinate space to my coordinate space for the waveform. Everything works great and it's really simple to keep track of my window and scaling, etc. I can even use the inverse transform to calculate the mouse po...

Scipy sparse... arrays?

Hey, folks. So, I'm doing some Kmeans classification using numpy arrays that are quite sparse-- lots and lots of zeroes. I figured that I'd use scipy's 'sparse' package to reduce the storage overhead, but I'm a little confused about how to create arrays, not matrices. I've gone through this tutorial on how to create sparse matrices: h...

iPhone OpenGL ES - How to Pick

I'm working on an OpenGL ES1 app which displays a 2D grid and allows user to navigate and scale/rotate it. I need to know the exact translation of View Touch coordinates into my opengl world and grid cell. Are there any helpers to do the reverse of last few transforms which I do for navigation ? or I should calculate and do the matrix st...

Any ideas on How to search a 2D array quickly?

I jave a 2D array like this, just like a matrix: {{1, 2, 4, 5, 3, 6}, {8, 3, 4, 4, 5, 2}, {8, 3, 4, 2, 6, 2}, //code skips... ... } (The Array is not sorted) I want to get all the "4" position, instead of searching the array one by one, and return the position, how can I search it faster / more efficient? thz in advance. ...

Matrices of "long"s in Java/COLT?

I'm very new to Java/COLT so apologies if this is a dumb question... But, is it possible to define (2d) matrices of type "long" using the cern.colt.matrix stuff? If so, how?! I can find an abstract class for "Object" and a concrete implementation for "double", but then I am stuck... Thanks, ...

Getting the transformation matrix of an animation in Android

I would like to obtain the transformation matrix of an animation to calculate the position of the view that was animated. It seems the Animation class has a method called getTransformation that can be used to obtain the transformation applied to the view. However, if I use getTransformation before starting the animation I obtain the id...

transpose 1D array of leading dimension N

how can i transpose an 1d array of leading dimension N, without extra space ? any language is fine ...

matrix image processing in OpenGL CE

im trying to create an image filter in OpenGL CE. currently I am trying to create a series of 4x4 matrices and multiply them together. then use glColorMask and glColor4f to adjust the image accordingly. I've been able to integrate hue rotation, saturation, and brightness. but i am having trouble adding contrast. thus far google hasn't be...

How to create a const boost matrix?

How can I create a const boost matrix? The following did not work: const boost::numeric::ublas::matrix<double> arrayM(1, 3) = { {1.0, 2.0, 3.0} }; ...

WPF Animate a Matrix using interpolation

I'm having a issue with my application that is using touch gestures to scale, translate and rotate my scene. I was using a TransformGroup which contained TranslateTransform, ScaleTransform and a RotateTransform but I could not get the movement correct, it always jumps and skips, so I moved to a MaxtrixTransform which I was able to use m...