Questions tagged as 'matriz'

1
answer

Define array in python

I need to create an array and populate it with random values ( randint(0,9) ), except for the same rows and columns. For example, this way: A| B| C| D| E A x| 2| 1| 4| 2 B 1| x| 1| 1| 2 C 5| 1| x| 4| 3 D 8| 2| 1| x| 2 E 5| 4| 1|...
asked by 19.11.2018 / 15:36
2
answers

Error adding each row of a 5x3 array

Hello, I'm having a problem adding up each of the rows in my array and storing it in a vector My code is like this: #include <stdio.h> int conta(int * matriz[5][3], int * vet) { for (int i = 0 ; i<5; i++) { for (int j =...
asked by 06.11.2018 / 23:15
2
answers

Problem with arrays in C

I have to make a program that will read 4 notes from each of the 6 students in a class and store them in an array NOTES [6] [5]. For each student, one should calculate the arithmetic mean of the 4 notes and store this average in the last column...
asked by 10.05.2018 / 02:18
1
answer

Break text and store in vector

I want the program to store only 1 sentence per line. Since each sentence is possible to be terminated according to the signs I show in my code example. It does this but when you print on the screen it does not print those same characters which...
asked by 10.11.2017 / 19:56
1
answer

How to display an array graphically?

I have a Tabuleiro[][] tabuleiro = New Tabuleiro[20][20] array. It contains objects of a class not yet implemented, which will have some values, such as cell color and a placeholder. I would like to know if you can graphically display thi...
asked by 09.04.2015 / 22:07
1
answer

How to traverse a 2-D array in C and display?

In this code, I have an array of two dimensions, I started and I want to start with printf, but I do not know how to do it: #include <stdio.h> #include <stdlib.h> int main() { int i; int matriz1 [3][4] = {1, 2, 3, 4, 5, 6,...
asked by 17.05.2015 / 02:33
1
answer

How do I avoid infinite loopings in an array?

"Assume that each element of this array has three values: 0 - if empty 1 - if it contains a tree 2 - if it contains fire With probability p given by the user, place a tree at each position of F (use Math.random() ). Choose a tree to...
asked by 19.11.2014 / 20:25
1
answer

Correlation Matrix in R (cov.wt)

In the cov.wt function in R is it possible to get only the Correlation matrix? cov.wt = Returns a list with estimates of the weighted covariance matrix and the mean of the data, and optionally of the (weighted) correlation matrix .     
asked by 12.08.2014 / 22:24
1
answer

Return a Matrix that has all possible column multiplications of another Matrix (R)

Be a Matrix: bb=replicate(3, rnorm(3)) [,1] [,2] [,3] [1,] 0.5556358 1.6611142 0.2374830 [2,] -0.6672456 -0.5038430 0.9814712 [3,] -0.1391022 -1.2072500 -0.6219965 How can I return a second array with all possibl...
asked by 17.07.2014 / 14:43
1
answer

How to loop in R and save the results of a table of contents to a vector

I asked a previous question in this forum ( Randomly choosing rows in an array in R ) where you needed to randomly choose p rows (p < m), without replacement, from that array. Thus creating a matrix p x n with which it was possible to perform...
asked by 17.04.2018 / 18:37