(defun (matrix-add m1 m2)
(defun (matrix-add-row r1 r2 res-row)
(if (and (not (null? r1)) (not (null? r2)))
(matrix-add-row (cdr r1) (cdr r2)
(cons (+ (car r1) (car r2)) res-row))
(reverse res-row)))
(defun (matrix-add-each m1 m2 res)
(if (and (not (null? m1)) (not (null? m2)))
(let ((res-row (ma...
I want to compute a diffusion kernel, which involves taking exp(b*A) where A is a large matrix. In order to play with values of b, I'd like to diagonalize A (so that exp(A) runs quickly).
My matrix is about 25k x 25k, but is very sparse - only about 60k values are non-zero. Matlab's "eigs" function runs of out memory, as does octave's ...
Is there any fast method to make a transposition of a rectangular 2D matrix in Python (non-involving any library import).? Say, if I have an array X=[[1,2,3], [4,5,6]] I need an array Y which should be a transposed version of X, so Y=[[1,4],[2,5],[3,6]].
...
How do you calculate the determinant of an NxN matrix C# ?
...
I have a 2-by-3 matrix, and I want to sort it according to the first column. Here's an example:
data will change to --> new data
11 33 10 22
22 44 11 33
10 22 22 44
I have this code for sorting a matrix A but it doesn't work well:
sort(A,1,'ascend');
...
What Xaml is required to display a DataGrid of this dictionary of dictionaries?
Public Property CharIndexedMatrixOfSingle As SortedDictionary(Of Char, SortedDictionary(Of Char, Single))
It's intended to display as bindable, editable (two way) n by n matrix of Singles.
...
say ive got a matrix that looks like:
[[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]
how can i make it on seperate lines:
[[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0]]
and then remove commas etc:
0 0 0 0 0
And also to make it blank instead of 0's, so that numbers can be put in later, so in the end it will be like:
_ ...
Hi,
I have a 2D Matrix consisting of some coordinates as below(example): Data(X,Y):
45.987543423,5.35000964
52.987544223,5,98765234
Also I have an array consisting of some integers >=0 , for example: Cluster(M)
2,0,3,1
each of these numbers in this array corresponds with a row of my 2D Matrix above.For example, it says that row one...
Hi,
I'm trying to understand bayesian network. I have a data file which has 10 attributes, I want to acquire the confusion table of this data table ,I thought I need to calculate tp,fp, fn, tn of all fields. Is it true ? if it's then what i need to do for bayesian network.
Really need some guidance, I'm lost.
...
I have a grid in a 2D system like the one in the before image where all points A,B,C,D,A',B',C',D' are given (meaning I know the respective x- and y-coordinates).
I need to calculate the x- and y-coordinates of A(new), B(new), C(new) and D(new) when the grid is distorted (so that A' is moved to A'(new), B' is moved to B'(new), C' is mov...
I've been doing some reading on transforming Vector3 with matrices, and am tossing up digging deeper into the math and coding this myself versus using existing code. For whatever reason my school curriculum never included matrices, so I'm filling a gap in my knowledge. Thankfully I only need a few simple things, I think.
Context is th...
Is there a simple way to swap the rows of a Matrix in F#?
...
This question is probably quite different from what you are used to reading here - I hope it can provide a fun challenge.
Essentially I have an algorithm that uses 5(or more) variables to compute a single value, called outcome. Now I have to implement this algorithm on an embedded device which has no memory limitations, but has very ha...
I've been having issues with this for far too long. This code should output dx,dy,dz for the accelerometer, and a running total of the dx. It should also output azimuth, pitch, and roll.
I've used info from http://bit.ly/codeUsed, but to no avail.
This code does not correctly output pitch, azimuth, or roll. It outputs 0.0, -0.0, -0....
Hi I have problem with matrix..
I have many .txt files with different number of rows but have the same number of column (1 column)
e.g. s1.txt = 1234 rows
s2.txt = 1200 rows
s2.txt = 1100 rows
I wanted to combine the three files. Since its have different rows .. when I write it to a new file I got this error = Index exceed...
Hi,
For my studies, we have code for matrix multiplication, for sizes between 1000-10000. It looks pretty fast, and uses GPU for calculations. As homework we need to find number crunching applications, with available source code, whose bottlenecks are in matrix multiplication. We will connect the program with the GPU code for matrix mul...
I'm trying to parallelize the element by element multiplication of two matrices in F#. I can't quite figure it out thought. I keep trying to create tasks but it never wants to compile. My non-working messy code is the following:
let myBigElemMultiply (m:matrix) (n:matrix) =
let AddTwoRows (row:int) (destination:matrix) (source1:matri...
I don't know if Matlab can do this, but I want to store some strings in a 4×3 matrix, each element in the matrix is a string.
test_string_01 test_string_02 test_string_03
test_string_04 test_string_05 test_string_06
test_string_07 test_string_08 test_string_09
test_string_10 test_string_11 test_string_12
Then, I want to write ...
I have a matrix that is 1000x4, to use as an input for a function I need to add a new column that contains a certain string. So how can I say make a new column where all the values are 'TEST'?
Thanks,
CP
...
I am building an iPhone application that needs to store some sort of matrix or vector data in core data. For some unknown reason, the iPhone SDK does not include any kind of matrix data structure in its foundation classes, so I built my own data structure which uses an NSMutableArray of NSMutableArrays to store the data. So far so good.
...