matriz

Operations with arrays in C++

To perform the sum of items of an array (primary diagonal and secondary diagonal) I was able to write the following code. Can ... { somaS += matriz[x][y]; } cout << somaS << endl; return 0; }

How to create a sub array from an array in Python?

I was able to generate an array via Python and through this generated array i had to generate a 3x3 array. But I do not know ... e other 3x3 matrices of this, as in this photo below: If anyone can help me and I will be extremely grateful! Thank you!

What is the difference between array and array?

After seeing arrays and arrays in programming, I got a little confused, so I would like to know, what is the difference between a array and a array?

How to create an array in python

I want to create an array where the user specifies the number of rows and the number of columns. Initially an empty matrix wa ... urn matriz There is a main function that will call that function, however, for now, my doubt is just assembling that array.

Matrix 4x4 ta getting 20 elements

Guys I did a Python code whose exercise asked to make a 4x4 array, show the amount of elements greater than 10 and show the f ... [j] > 10 : contadorp = contadorp + 1 print('A quantidade de numeros maiores que 10 é ' , contadorp) print(m,m1)

Sum the diagonals of a matrix

I need to make a program that adds the diagonals of an array. As the example But I'm having a hard time. Follow Code: #i ... o only the sum of the diagonals to then use the threads to perform the processes. Could anyone help me? Thank you right now.

How to count the objects present in the image with PHP?

The original photo of the bean is this: Decreases the resolution of the photo, I have already applied a filter to be gray ... lowing: From there I'm trying find a way to count how many portions of x has in that array. Can someone help me with this?

Brute force algorithm for solving Sudoku game in C

I have the following code written in C: #include <stdio.h> #include <stdlib.h> #include <time.h> // Vari ... his way the program enters an infinite loop (so the two lines are commented). How to solve this and fill the board correctly?

What is the difference between one-dimensional and two-dimensional matrix?

In high school we usually study on the concept of Matrix, which consists of a row table and columns forming a set of numbers ... -dimensional and a two-dimensional array? I would like examples in some languages, e.g. java , php, c++ se possible.

How to divide the elements of an array by the average of your column

I need to divide the elements of a matrix by the respective mean of its column, How can I do this, is there any function to p ... 16 And the mean of each column in the Vector: > MediacolA <- colMeans(A) > MediacolA [1] 2.5 6.5 10.5 14.5

How to get the highest value of an array/vector in python?

How do I get the highest value of an array or vector? For example, in this exercise I have to make a 4x4 array and return t ... m = [] for i in range(4): linha = [] for j in range(4): linha.append(int(input())) m.append(linha)

How to create a standard deviation Mobile window (R)

A being the matrix below the return of actions ( ret_matrix) for a given period. IBOV PETR4 VALE5 ... ... [6,] sd[2:6,1] sd[2:6,2] ... [7,] sd[3:7,1] sd[3:7,2] ... [8,] sd[4:8,1] sd[4:8,2] ... [9,] sd[5:9,1] sd[5:9,2] ...

Array with strings in Visualg

I am having difficulty with the following Question: Create an array M [21,10]. Read 10 names (with a maximum of 20 chara ... ibute the letters in the array, and my code error says it's missing a do on the 5th line from bottom to top, but do is there.

Matrix multiplication by Matrix transposed in C language

I'm new to programming and I'm trying to make a C-language program that multiplies a 3x3 matrix by its transpose and prints t ... , 2, 3. The result matrix (mat_resultado) will have the following numbers in the output: 101, 32, -37, 32, 38, 4, -37, 4, 29.

How to transform more than one vector into an array using the php language?

I have a file matriz_caminhos.txt with 20 rows and 20 columns, I need to access it and take the data as an array. So far, I ... origin, destination and method, I with the code above, I managed to print the 20 vectors, as the picture shows below:

Sum values of rows and columns and store in vector

Good afternoon, I'm making an algorithm in which I need to store the total of the sums of each row and each column in distinc ... arLInha(); } for(i = 0; i < 5; i++) { printf("[%i] ", vetorA[i]); } }

Matrix generator in Python

The program does the following: I say the number of rows and columns I want in my array and then assign a value for each colu ... C[1]: 7 Número L[3] C[2]: 8 Número L[3] C[3]: 9 [[1, 2, 3], [4, 5, 6], [7, 8, 9]] Thank you very much if you can help me!

How to do the rest of the division of a float by a number in c?

I'm a beginner in programming in c, I have a problem here the exercise and calculate the mean of the odd ones in a matrix tha ... loat m=mediaImpar(a); printf("%f",m); return (EXIT_SUCCESS); } How to solve this problem, and what is the cause?

Square array in Python 3

My code is printing spaces at the beginning and end of the line, and is giving presentation error (URI question 1557) does an ... for b in a: convert1=str(b) print("{}".format(convert1).rjust(aux),end="".strip()) print() print() matriz = []

Error in Matrix 3x3

I am having difficulties in a java code. I'm trying to make a code which generates a 3x3 array. I made a code to which the fi ... g.ClassLoader.loadClass (ClassLoader.java:357) at sun.launcher.LauncherHelper.checkAndLoadMain (LauncherHelper.java:495)