Questions tagged as 'matriz'

0
answers

Coordinate count in MATLAB

Hello. I have an 8x2 array: M = [12; 58; 31; 6 6; 7 1; 12; 31; 7 1]; I would like to count how many times each line (x, y) repeats. The result should be, for example, like this: Attempt: [i,j]=hist(M,unique(M)); out=[j' sum...
asked by 03.08.2018 / 18:36
0
answers

Function to multiply each row of a matrix by the value of its corresponding secondary diagonal

I can not get the values of the secondary diagonal of an array by a function. /* 19) Elabore uma sub-rotina que receba como parâmetro uma matriz A(6,6) e multiplique cada linha pelo elemento da diagonal principal da linha. A sub-rotina deverá...
asked by 24.07.2018 / 21:08
0
answers

How to fill a matrix randomly

I have an array filled with the value one in the center, and I want to add new positions with the value 1. These values must be in the boundary dimensions of the array. However, these positions should be changed later until the position reached...
asked by 15.07.2018 / 21:06
0
answers

Error Returning Two-D Matrix in C

Next, I have a ReadData function, which receives all information from a txt file, after that I use the BreakStringComplete function to separate this string by the delimiter "\ n" inside the function, through printf I can see that the lines were...
asked by 27.06.2018 / 01:59
0
answers

How to return a dynamically allocated two-dimensional array?

In a generic formulation, I have a function that places a value in an array of strings; just as an example: char **matrizExemplo() { char **vet; char tamVetor = 1; vet = malloc(sizeof(char*)*tamVetor); vet[0] = malloc(sizeof(c...
asked by 26.06.2018 / 17:29
1
answer

How to separate a vowel of consonants into a matrix in C

Hello, I have a problem with my code. I have an array [6] [3] that reads letters, after reading I want to separate the vowels from the consonants. However, I did not succeed because all the letters go to the consonant variable. Can someone take...
asked by 23.06.2018 / 17:13
2
answers

How to find the most common value inside each column of an array using python?

I have an array (3 x 3280), I need to traverse each column and consequently each row and find the most frequent value and thus generate another vector (1 x 3280) with those values. For example: matriz=[1 2 3 4 ....],[2 3 4 5....],[1 2 4 4...]]...
asked by 01.06.2018 / 17:59
0
answers

Two-dimensional Matrix in C [duplicate]

I have a product registration in C. Products can be up to 30 characters (columns), but can be infinite in quantity (lines). In the variable declaration, I used:    char products [] [30]; However, when compiling, it returns that the...
asked by 05.06.2018 / 14:37
1
answer

How to transform a list that will be given on entry into an array?

I'm trying to transform this list that was given to me in input into an array u l i o a e a p b e a r y l s j i t u a e e h u b e u o r r c t n e p b i o s b This is one of the input examples, my But the most I've achieved so far...
asked by 29.05.2018 / 19:53
1
answer

How to find the largest value in an array? [duplicate]

Well, I have a 3x4 array and I want to know how to develop a python code to get the highest value from this array. My code done so far was this: LINHAS = 3 COLUNAS = 4 LINHA_ MatrizM = [] for i in range(LINHAS): MatrizM.append([])...
asked by 06.06.2018 / 18:15