Skip to main content

All Questions

Tagged with
0 votes
0 answers
36 views

How to access an element from a 2D array, with non-sequential row and column data - C#

I need to access a text file containing some data gathered from the machine from two testing planes. One plane is vertical and creates rows that can be 1-180 degrees with 1, 5 or 10-degree intervals, ...
Darren's user avatar
  • 1
-1 votes
1 answer
58 views

Turn 2D matrix with indexes (tuples) to 2D Boolean matrix (in different shape) - NumPy

I’m looking for an efficient way to make index matrix to Boolean matrix, without a loop (with NumPy). The index matrix build from tuples which represents indices. I need to build a Boolean matrix (in ...
Liri Norkin's user avatar
-2 votes
2 answers
3k views

how to get the index of list of list in java

class Result { public static int diagonalDifference(List<List<Integer>> arr) { int sum=0,sum1=0; for(List<Integer> list:arr){ for(Integer ...
Killerkc12's user avatar
0 votes
0 answers
34 views

Python -> 2D list changing at every index? [duplicate]

I've created 28 char array seq, and copied it 100 times to other array copies. Now at each copy I'd like to change one random char to the other one - def mutate(). It works when it is not in "for". ...
Tomek's user avatar
  • 13
0 votes
4 answers
6k views

Matlab indexing into 2D array using

I have a 2D matrix, say M=zeros(10,10); I have another column matrix, V=[1;2;3;4;5;6;5;4;3;2]; I would like to be able to set M(i,j) = 1 for all j >= V(i) I know I can do this in a loop for i=1:...
Dave Durbin's user avatar
  • 3,612