Questions tagged as 'matriz'

1
answer

Grouping, assigning and sorting values of a multidimensional array in PHP

Hello everyone. I have the following multidimensional array in PHP: Array ( [0] => Array ( [0] => teste0 [1] => 1 ) [1] => Array ( [0] => teste1 [1] => 1 ) [2] => Array ( [0] => teste2 [1] => 2 ) [3] => Array...
asked by 11.06.2018 / 05:32
1
answer

Sort matrix of n rows having as criterion the value of the column in C

I have the following code: int** ordena(int **v, int tam) { int i, j,aux; int swap[3]; for (i = 0; i > (tam-1); i++){ aux = i; for (j = (i+1); j > tam; j++) { if(v[j][1] > v[aux][1]) { aux = j...
asked by 20.04.2018 / 00:11
2
answers

Checking the number repeated in the matrix in C

I can not seem to find the error of this code. I made it to check if in a 4x4 array the number being inserted already exists. For some reason that I do not know he accepts repeated values sometimes and sometimes not ... int main() { bool bExit...
asked by 26.02.2018 / 00:34
1
answer

Function Result in an Array of Objects?

How to transform the output of this function into a array ? In future I would like to call only the result of a particular row, such as $palavraschave[1] . <?php $url= 'https://www.telelistas.net/ac/acrelandia'; function palavr...
asked by 06.03.2018 / 01:11
1
answer

edges of an array N x N

I would like to know how to set the edge values of an array to -1. I've tried to create an array of N + 2 x N + 2, and do it with a single, go through the edges, but when I put it to print it displays some strange values. I believe you have acce...
asked by 09.02.2018 / 04:17
1
answer

How to check if the array is symmetric?

I'm doing a college activity in which it asks to check if the array entered by the user is symmetric or not. Here's my code: #define TAMANHO 4 #include <stdio.h> #include <stdlib.h> #include <locale.h> void receberMa...
asked by 08.01.2018 / 21:20
1
answer

Error in matrix 3x3

I'm having trouble with a java code. I am trying to make a code which generates a 3x3 array. I made a code which at first sight works okay. matrix3x3 public static void main(String[] args) { // TODO code application logic here...
asked by 10.01.2018 / 19:56
1
answer

Passing array to function by reference

Good morning everyone, I want in my code to leave the Main (); only with function call, all work is divided into small functions in the document. I want to write an array [3] [3] in a function and organize and print it in other distinct funct...
asked by 20.12.2017 / 13:18
1
answer

Return number of rows or columns of an array

I have an array like this in Delphi XE8: Matriz[2][3] . I would like to know what method I can use to return the number of rows or columns in this array, my idea is to loop with 2 for 'if I scroll through the array elements by in...
asked by 06.10.2017 / 20:44
1
answer

How to mount an array in python with undefined value of i and j

I'm a beginner in python and I'm doubtful about array assembly. In the case, I did the following: import numpy as np n=3 A = np.zeros((n*n,n*n)) j= 2 i = 2 k = i+n*(j-1) a = -4 L1 = i-1+n*(j-1) a1 = 1 L2 = i+1+n*(j-1) a2 = 1 L3 = k-n a3 = 1 L4...
asked by 08.11.2017 / 03:50