matrix Questions
3
I have a camera view matrix which I received from a GL program. I know that this matrix is right-handed since this is the way GL works, but how can I check whether this matrix is right-handed or le...
8
Solved
I would like to populate a matrix by row based on a function which gives the seq() of a number seq(1) 1 seq(2) 1 2 and so on
matrixinp = matrix(data=NA, nrow=6, ncol=6)
> print(matrixinp)
[...
4
Solved
I'm complitely new to Flood Fill algorithm. I checked it out from Wikipedia (http://en.wikipedia.org/wiki/Flood_fill). But didn't become that much wiser. I'm trying to use it in following situation...
Vulpine asked 7/11, 2013 at 15:34
4
Solved
Consider this:
a = array(1:60, c(3,4,5))
# Extract (*,2,2)^th elements
a[cbind(1:3,2,2)]
# ^^ returns a vector of length 3, c(16, 17, 18)
# Note this is asymptotically inefficient -- cbind(1:k,2...
Browse asked 19/8 at 9:29
4
I have a matrix which would be a matrix of factors if R supported them. I want to print the matrix with the factor names, rather than integers, for readability. Using indexing loses the matrix stru...
Retreat asked 18/8 at 20:55
3
It is convenient for isometric grids to start at the top like this:
I have the following code to draw a "3d" isometric box:
body {
display: flex;
justify-content: center;
align-it...
Prussian asked 2/8 at 19:26
4
Solved
I know how to solve A.X = B by least squares using Python:
Example:
A=[[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,0,0]]
B=[1,1,1,1,1]
X=numpy.linalg.lstsq(A, B)
print X[0]
# [ 5.00000000e-01 5....
Agrarian asked 25/11, 2014 at 13:58
4
Solved
I have a symmetric matrix represented as a numpy array, like the following example:
[[ 1. 0.01735908 0.01628629 0.0183845 0.01678901 0.00990739 0.03326491 0.0167446 ]
[ 0.01735908 1. 0.0213712 0....
5
Solved
Lets say I have the following matrix:
A = np.array([
[1,2,3],
[4,5,6],
[7,8,9]])
How can I extract the upper triangle matrix without the diagonal efficiently?
The output would be the follow...
7
Solved
Consider a set of points arranged on a grid of size N-by-M.
I am trying to build the adjacency matrix such that
neighboring points are connected.
For example, in a 3x3 grid with a graph:
1-2-3
| ...
Taker asked 18/7, 2010 at 22:36
16
Solved
What I am after is Python code able to reverse the order of the values in each of the array anti-diagonals in a numpy array.
I have already tried various combinations of np.rot90, np.fliplr, np.tra...
1
Solved
Context
I'm trying to handle geometric operations applied to HTML elements by CSS3 3d transforms through DOMMatrix API to retrieve any coord i want in any coord system i want.
The Issue
Everything ...
Bowen asked 10/6 at 8:29
3
Solved
I have a rectangular matrix with n rows and m column. All entries of the matrix are natural numbers (including 0).
Among the m columns, I'm given some index, j (< m). I'd like the matrix to beco...
Undercool asked 31/5 at 6:4
7
Solved
Does python have a built-in function that converts a matrix into row echelon form (also known as upper triangular)?
6
Solved
I need to convert the Excel matrix FIRST in the table LATER:
FIRST:
P1 P2 P3 P4
F1 X
F2 X X
F3 X X
F4 X X
LATER:
F P VALUE
F1 P1 X
F1 P2
F1 P3
F1 P4
F2 P1 X
F2 P2 X
F2 P3
F2 P4
F3 P1
F3 P2 X...
Busily asked 12/12, 2013 at 11:11
2
I have a matrix A = np.array([[1,1,1],[1,2,3],[4,4,4]]) and I want only the linearly independent rows in my new matrix. The answer might be A_new = np.array([1,1,1],[1,2,3]]) or A_new = np.array([1...
Forbid asked 7/12, 2018 at 9:59
4
Solved
I'm trying to create a diagonal matrix with 390 rows and 2340 columns, but in the diagonal I need to have a vector of 1, rep(1,6).
For example, these should be the first two rows:
1111110............
8
Solved
I have an guaranteed to be a perfect square matrix. I want to start at the center of the matrix in this case it would be matrix[2][2], I know how to figure the center (int)(dimensions / 2). I need ...
5
I have calculated an axis angle rotations for each axis. If I only apply one of the three rotations, the objects rotates as expected.
If I multiply the rotation matrixes, as you would normally do ...
Shanan asked 3/4, 2017 at 16:25
11
Solved
Let data = [[3,7,2],[1,4,5],[9,8,7]]
Let's say I want to sum the elements for the indices of each list in the list, like adding numbers in a matrix column to get a single list. I am assuming that ...
10
Solved
I've been reading a lot about this, the more I read the more confused I get.
My understanding: In row-major rows are stored contiguously in memory, in column-major columns are stored contiguously ...
Moneywort asked 23/11, 2015 at 2:8
6
Solved
I have a set of points in 2-dimensional space and need to calculate the distance from each point to each other point.
I have a relatively small number of points, maybe at most 100. But since I ne...
Vannesavanness asked 28/3, 2014 at 18:47
13
Solved
You can apply a function to every item in a vector by saying, for example, v + 1, or you can use the function arrayfun. How can I do it for every row/column of a matrix without using a for loop?
Volscian asked 21/2, 2010 at 19:58
4
Solved
I'm trying to filter such that once a unique number from a pair of number is found starting from the top of the matrix, any subsequent pair entry is removed from the matrix leaving only the the fil...
4
Solved
I have a data frame with 10 columns, collecting actions of "users", where one of the columns contains an ID (not unique, identifying user)(column 10). the length of the data frame is about 750000 r...
Dodder asked 30/8, 2013 at 7:14
1 Next >
© 2022 - 2024 — McMap. All rights reserved.