Questions tagged as 'matrices'

1
answer

Matrix with Java Script

I need help with a job, I am new in what is programming and the teacher that I play does not teach us well what to say. I explain roughly what is the exercise: From a budget entered by keyboard I have to distribute among 37 municipalities, in tu...
asked by 02.11.2017 / 03:08
1
answer

Calculate successors of a node in a directed graph

Given the following exercise:    Consider the graph_t class,   that represents a graph directed by an incidence matrix, in which the position (i, j) in the matrix M_ represents the value of the arc that goes from the vertex i-1 to j-1 in the...
asked by 23.07.2017 / 21:42
1
answer

Sort CSV Matrix by Python date

I am doing a small development, in which I read from a CSV file in this way: csv = np.genfromtxt('MMRExport.csv',delimiter=",", dtype=str) Then what I do is create lists since I only need 2 columns of the file, one of "date" and another...
asked by 05.07.2017 / 15:08
2
answers

Prevent the repetition of numbers in a matrix [duplicated]

I have an algorithm where I fill a matrix of 10 x 10. I wish that at the time of printing the matrix, no number is repeated. This is my code: int posi = 0, posj = 0, mayor = 0;//declaracion de variables para la posicion y el numero mayor...
asked by 10.08.2017 / 14:13
1
answer

Add corners of a matrix in Ruby

I have a square matrix. Let's say that I set it to 3 and put as data 1 to 9, the corners would be 1, 3, 7, 9. So, I use this code to find and add them: for i in 0..N-1 for j in 0..N-1 if(((i==0) || (i==N-1))&&((j==0) ||...
asked by 18.05.2017 / 02:42
1
answer

Error copying an array in another in c

The truth happens to me something very strange is that I copy one matrix in another as I have always done but it is badly copied I leave photo . As you can see in the photo, the first 3 columns are copied well, but 4 copies the first o...
asked by 30.11.2018 / 21:58
0
answers

Problem in dynamic matrices within a function

I would like to know if you could help me pass a function that is for a 3x3 matrix, for a dynamic matrix, is that I can not find the solution to create it, this is the function: bool yavisitado(cuadrito estado_a_verificar) { list < cuad...
asked by 29.11.2018 / 03:58
1
answer

PLEASE HELP Sum of elements of a matrix

I am a student of computer engineering and I just left an exercise which is giving me several problems to solve it, I have to create a 4x5 matrix in windows forms and display all the elements of this, all right here but in addition to doing this...
asked by 24.11.2018 / 02:50
0
answers

'NoneType' object has no attribute '_nserie' - Python Collections

I have the following classes: class Contenedor: def __init__(self, nserie, categoria, peso): self._nserie = nserie self._categoria = categoria self._peso = peso @property def categoria(self):...
asked by 07.11.2018 / 23:17
1
answer

draw inverse of a matrix in module n?

I need to draw the inverse of a matrix but in module 29,  [[6 3 26]  [28 10 7]  [12 22 20]] it is assumed that if the matrix in module 29 is well taken out, it would be as follows:  [[13 7 29]  [1 22 11]  [17 7 9]]     
asked by 06.11.2018 / 04:49