matrix

How do you create a matrix from a text file in MATLAB?

I have a text file which has 4 columns, each column having 65536 data points. Every element in the row is separated by a comma. For example: X,Y,Z,AU 4010.0,3210.0,-440.0,0.0 4010.0,3210.0,-420.0,0.0 etc. So, I have 65536 rows, each row having 4 data values as shown above. I want to convert it into a matrix. I tried importing data fro...

Matrix transforms; concepts and theory, are there any free resources for learning practically?

I've been having fun rendering charts and graphs from co-ordinates lately, and I'm fascinated by using matrices to transform co-ordinate spaces. I've been able to successfully scale and invert 2 dimensional co-ordinate spaces, but now my appetite is whetted. :) Where can I go for clear, informative, (free), educational material on matr...

Best way to achieve exclusion matrix via query.

What is the best way to achieve this exclusion matrix via query. There are fixed number of products in a table and idea is if a product is sold to a customer (represented by row), the other products (columns) may or may not be sold based on the rule matrix below. The aim is to get products code which are allowed to sold for any given s...

Vector to Matrix syntax in MATLAB...

Is there a way to combine 2 vectors in MATLAB such that: mat = zeros(length(C),length(S)); for j=1:length(C) mat(j,:)=C(j)*S; end Using normal MATLAB syntax similar to: mat = C * S(1:length(S)) This gives a "Inner matrix dimensions must agree error" because it's trying to do normal matrix operations. This is not a standard Lin...

What happened to Microsoft.FSharp.Math.Matrix?

Kind of strange how this class type has dropped of the F# released with VS2010 Does anyone know where it has gone? or where it is now? ...

Read co-ordinates from a txt files using C Program

Hey, I want to read cartesian coordinates of a large set of points from of a .txt file into a matrix or some such data structure using a C program. The file has contents of the type 023 435 1.0 23.5 12.5 0.2 : : : : : : : : : : : : and so on... There are about 4000 such co-ordinates in the file. First column i...

how to generate pseudo-random positive definite matrix with constraints on the off-diagonal elements?

The user wants to impose a unique, non-trivial, upper/lower bound on the correlation between every pair of variable in a var/covar matrix. For example: I want a variance matrix in which all variables have 0.9 > |rho(x_i,x_j)| > 0.6, rho(x_i,x_j) being the correlation between variables x_i and x_j. Thanks. ...

how to generate pseudo-random positive definite matrix with constraints on the off-diagonal elements?

The user wants to impose a unique, non-trivial, upper/lower bound on the correlation between every pair of variable in a var/covar matrix. For example: I want a variance matrix in which all variables have 0.9 > |rho(x_i,x_j)| > 0.6, rho(x_i,x_j) being the correlation between variables x_i and x_j. Thanks. Ok, something of a quick&di...

Python Numpy Very Large Matrices

Numpy is an extremely useful library, and from using it I've found that it's capable of handling matrices which are quite large (10000x10000) easily, but begins to struggle with anything much larger (trying to create a matrix of 50000x50000 fails). Obviously, this is because of the massive memory requirements. I was wondering if there ...

C - Sending the contents of a matrix in one function to a matrix in another function

Good evening. How can I pass the contents of a char matrix in one function to another matrix of equal dimensions in another function? Many thanks in advance. ...

SSRS Using “Jump to Report” expression for Drill through to ignore subtotal in matrix

I have a drill through link on the value cell of a matrix to show a detailed report. However when I run the report, users are able to drill through using the sub total of this value. How do I disable the click through navigation for the subtotal only. Answer: Using the “Jump to report” expression (on the Navigation tab, in properties of...

A question about printf arguments. C/C++.

Hello, We have the following code fragment: char tab[2][3] = {'1', '2', '\0', '3', '4', '\0'}; printf("%s\n", tab); And I don't understand why we don't get an error / warning in the call to printf. I DO get a warning but not an error, and the program runs fine. It prints '12'. printf is expecting an argument of type char *, i.e. a po...

Flags in Python

I'm working with a large matrix (250x250x30 = 1,875,000 cells), and I'd like a way to set an arbitrary number of flags for each cell in this matrix, in some manner that's easy to use and reasonably space efficient. My original plan was a 250x250x30 list array, where each element was something like: ["FLAG1","FLAG8","FLAG12"]. I then cha...

Removing Similar Elements in Matrix

I'm trying to figure out how to remove an element of a matrix in MATLAB if it differs from any of the other elements by 0.01. I'm supposed to be using all of the unique elements of the matrix as thresholding values for a ROC curve that I'm creating but I need a way to remove values when they are within 0.01 of each other (since we are as...

Transformation using MovieClip.transform.matrix problem

I have problem when dealing with transform in Flash cs4 .... When I rotate my movieclip and trace the output, my movieclip's width also changed.... ...

Change reference point when rotating image in IE using MatrixFilter

I've found that you can rotate an image in IE using the MatrixFilter, examples can be found on MSDN but the rotation point seems to move about as you increase the angle. ...

Is there a script available to resize SVG?

Is there a way to script the rescaling of a .SVG from its current size (thousands of pixels) to a much smaller size? I've tried ImageMagick, but its support for SVG gradients is far too weak to be useful. The purpose is to work around a bug in a rendering library that sometimes causes svgs with large pixel sizes to allocate large raste...

Matrix from Python to MATLAB

I'm working with Python and MATLAB right now and I have a 2D array in Python that I need to write to a file and then be able to read it into MATLAB as a matrix. Any ideas on how to do this? Thanks! ...

How can I create a 2-dimentional matrix and feed information from arrays in Perl?

I have four arrays @A1, @A2, @A3, @A4 each with same number of elements, say 6. I want to create a 2 dimensional array which stores the values of two array elements I want output corresponding to following format. For example Array1: A B C D E F Array2: E F G H I J Array3: Q W E R T Y Array4: P O L I U G Then the Matrix should be: ...

Calculating 'up vector' from transformation matrix in 3D

Hello! I just came to strange problem with my project in 3D. Everyone knows algorythm of calculating LookAt vector, but it is not so easly to calculate "up" vector from transformation matrix (or at least maybe I simple missed something). The problem is following: "Up" vector is (0, 1, 0) for identity rotation matrix and rotate with ma...