I have a lot of matrix variables. Some have more than 200 rows. How can I export them to an XLS or DAT file with their names? I tried the following:
d = {'X', 'Y'; X Y};
xlswrite('tempdata1.xls', d, 'Sheet1', 'A1');
What I got in the XLS file was only the strings 'X' and 'Y' but without the values of X and Y. X and Y should be vectors...
Hi, I am using Scipy to construct a large, sparse (250k X 250k) co-occurrence matrix using scipy.sparse.lil_matrix. Co-occurrence matrices are triangular; that is, M[i,j] == M[j,i]. Since it would be highly inefficient (and in my case, impossible) to store all the data twice, I'm currently storing data at the coordinate (i,j) where i i...
My app relies heavily on Core Animation; the main view contains dozens of CALayers. In order to facilitate zooming in/out, I have a master layer which contains all layers that I wish to be 'zoomable'. When I zoom, simply modify the sublayerTransform of the master layer.
This works fine, however I would like the actual content rendered b...
Assume we have the following data:
H_T = [36 66 21 65 52 67 73; 31 23 19 33 36 39 42]
P = [40 38 39 40 35 32 37]
Using MATLAB 7.0, I want to create new three matrices that have the following properties:
The matrix H (the first part in matrix H_T) will be divided to 3 intervals:
Matrix 1: the 1st interval contains the H values bet...
Hello,
I have an object which has a position, a rotation angle and a scale (x and y). The overall transform matrix is as follows :
QTransform xform;
xform.translate(instance.definition.position.x, instance.definition.position.y);
xform.rotateRadians(instance.definition.rotation);
xform.scale(instance.definition.scale.x, instance.defini...
I must multiply matrix by itself until the matrix in some degree would not be equal one of the preceding matrices. Then I need to get the values of degrees, in which the matrices are equal. The number of rows and columns are equal. Matrix is stored in a two-dimensional array. Values are 0 or 1. What is the best way to check for equality ...
Has anyone done this?
...
I need to compute the largest eigenvalue of a (sparse) matrix. I implemented the power iteration method, but it is too slow to converge, so I'd like to use a package for it. Does anyone have a recommendation?
What is the best C++ eigenvalue computation package? Preferably one that is small and easy to compile.
...
Is there a function in R that produces the reduced row echelon form of a matrix?. This reference says there isn't. Do you agree?
...
How can I represent matrices in python?
...
How do I do a perspective view transformation in Java? As I understand it there is some magical 4 dimensional matrix I can use which will determine the FOV, Aspect Ratio, and Near and Far viewing distances, but I don't know how to create that matrix.
I'm able to implement a "PerspectiveTransform" in Java, but I see no effect when using ...
Hi,
I am working on a image editing tool where user can pan / rotate and zoom the image. I am using Matrix to apply rotation and zooming effects. Now the probelm is that if image is not rotated, its panning works perfectly. But once the user rotates it, panning functionality goes for a toss.
Here's the line of code i am using to drag (p...
Hello: Does Global Work Size (Dimensions) Need to be Multiple of Work Group Size (Dimensions) in OpenCL?
If so, is there a standard way of handling matrices not a multiple of the work group dimensions? I can think of two possibilities:
Dynamically set the size of the work group dimensions to a factor of the global work dimensions. (thi...
I am trying to work out if I can parallelise the training aspect of a machine learning algorithm. The computationally expensive part of the training involves Cholesky decomposing a positive-definite matrix (covariance matrix). I'll try and frame the question purely in terms of the matrix algebra. Let me know if you need any more info.
L...
Hi,
lets say I have a very big matrix with 10000x10000 elements all having the value '0'. Lets say there are some big 'nests' of '1's. Those areas might even be connected, but very weekly connected by a 'pipe' of '1's.
I want to get an algorithm that very quickly (and dirty if necessary) finds these 'nests' of '1's. Here it shouldn't '...
I am not sure how to go about this in Python, if its even possible. What I need to do is create an array (or a matrix, or vector?) from 3 separate arrays. Each array as 4 elements as such, they return this:
Class1 = [1,2,3,4]
Class2 = [1,2,3,4]
Class3 = [1,2,3,4]
Now what I would like to do is return all possible combinations of thes...
Keeping simple, take a matrix of ones i.e.
U_iso = ones(72,37)
and some parameters
ThDeg = 0:5:180;
dtheta = 5*pi/180;
dphi = 5*pi/180;
Th = ThDeg*pi/180;
Now the code is
omega_iso = 0;
for i = 1:72
for j=1:37
omega_iso = omega_iso + U_iso(i,j)*sin(Th(j))*dphi*dtheta;
end
end
and
D_iso = (4 * pi)/omega_iso
...
dt1 dt2 dt3 dt
1 3 6 10
2 4 1 5
3 6 5 3
4 7 4 1
5 1 2 4
6 2 8
7 8
8
9
10
I have the above data which I want to combine in one single matrix (10 x 4). The maximum number of row is 10. I created zeros matrix, however I have problem since the data doesn't have the same dimension. How it is poss...
student1 student2 student3
code score code score code score
1 20 1 100 1 22
2 11 3 11 2 90
3 12 4 22 5 11
4 11
5 28
This question is related to http://stackoverflow.com/questions/3174631/matlab-how-to-combine-uneven-matric-into-single-matrix but a li...
I'm thinking I need to use numpy or some other library to fill these arrays fast enough but I don't know much about it. Right now this operation takes about 1 second on a quad-core Intel PC, but I need it to be as fast as possible. Any help is greatly appreciated. Thanks!
import cv
class TestClass:
def __init__(self):
w = 960
...