matrix assignment from a matrix A to a matrix B using conditional statements based on a third matrix C 
Category : Programming Languages 
I have two questions if you can kindly respond: Q1) I have a
matrix choice , where each person is making 4 of any possible
choices, denoted as 1, 2, 3 and 4. I have three matrixes
A1 , A2 , A3 with income information
for each person and each time period. Say I have n people and t time
periods so A1 , A2 ,
View Replies



Is there any builtin type of matrix in CUDA for matrix and matrixvector operation? 
Category : Programming Languages 
I want to implement some matrix–vector math. There are vector
types like: float2 , int2 , but I cannot find any
builtin type matrix in CUDA. Is there a library that suitable
for such operations?
View Replies


Based on a matrix A, generate a matrix B with all possible multiplications of the columns of Matrix A 
Category : Programming Languages 
Say I have a matrix with 3 columns: c1 ,
c2 ,c3 , and I want to create a new matrix in which
each column is any possible product of two of the columns of this matrix.
So, if I had a matrix with d columns, I would like to create a
new matrix with d+d(d1)/2+d columns. For example, consider the matrix with
3 columns c1 , c2
View Replies



Replace matrix values in a matrix with mean values extracted from a smaler matrix in matlab 
Category : Programming Languages 
Lets say I have an 10 x 10 matrix. What I do then is iterate throug the
whole matrix with an 3x3 matrix (except the edges to make it easier), and
from this 3x3 matrix I get the mean/average value of this 3x3 space. What I
then want to do is to replace the orignal matrix values, with those new
mean/average values. can someone please explaine to me how I can do that?
Some code examples would be a
View Replies


Accessing a matrix element by matrix[(a, b), c] instead of matrix[a, b, c] 
Category : Programming Languages 
I want to achieve the following: Have a AxBxC matrix (where
A,B,C are integers). Access that matrix not as matrix[a, b,
c] but as matrix[(a, b), c], this is, I have two variables, var1 =
(x, y) and var2 = z and want access my matrix as matrix[var1,
var2]. How can this be done? I am using numpy matrix, if it makes
any difference. I know
View Replies


How to store Sparse matrix for a matrixvector multiply when some boundary condition values are known? 
Category : Programming Languages 
I have a sparse matrix that represents a 3D rectangular space. Along
some of the boundaries, I know what the value is going to be (it's a
constant). The other boundaries may be reflective, differential, etc.
Should I just set the problem up as if all the boundaries were
say, differential, and then go back and set the nodes in the solution
vector b to be the constants? T
View Replies


Load sparse scipy matrix into existing numpy dense matrix 
Category : Programming Languages 
Say I have a huge numpy matrix A taking up tens of gigabytes. It takes
a nonnegligible amount of time to allocate this memory. Let's
say I also have a collection of scipy sparse matrices with the same
dimensions as the numpy matrix. Sometimes I want to convert one of these
sparse matrices into a dense matrix to perform some vectorized
operations. Can I load one of the
View Replies


R or MATLAB: permute a large sparse matrix into a block diagonal matrix 
Category : Programming Languages 
I have a large sparse matrix, and I want to permute its rows or columns
to turn the original matrix into a block diagonal matrix. Anyone knows
which functions in R or MATLAB can do this? Thanks a lot.
View Replies


Make TikZ matrix[matrix of math nodes] use cartesian coordinates? 
Category : Coding 
No matter how hard I try, I can't get it out of my head that (0,0) is
the lower left corner and the first coordinate is the horizontal
position. Unfortunately TikZ/PGF's wonderful "matrix (m)
[matrix of math nodes]..." automatically assigns names (like m32) whose
first coordinate is the vertical position, and puts (1,1) at the upper left
corner. Trying to work this way is making
View Replies


Java. Writing a matrix in a file using column information. ( matrix transposition ) 
Category : Programming Languages 
I have a file in which a matrix is stored. This file has a
RandomAccessFile type. This matrix is stored by columns. I mean that in an
ith row of this matrix an ith column (of a real matrix) is stored. There
is an example: ith row: 1 2 3 4 (in the file). That means that the
real matrix has an ith column: (1 2 3 4)(is transposed). I
need to save this matrix in a natural way (
View Replies


