Most voted "matrix" questions
An array is a collection of variables of the same type, accessible with a single name and stored contiguously in memory. The individualization of each variable of a vector is done through the use of indexes. Vectors are matrices of a single dimension.
Learn more…508 questions
Sort by count of
-
0
votes1
answer91
viewsCreate a recursive function to accuse the occurrence of an element in a matrix
I have some problems creating a recursive function that accuses the occurrence of a requested element. So far, this is what I’ve been able to do (perhaps I’ve made some mistake with pointer…
-
0
votes2
answers74
viewsScanf does not close the read
I am trying to make a program where it receives a char matrix and at the end prints the new matrix. #include <stdio.h> int main(){ int l,c,i,j; scanf("%d %d",&l,&c); char…
-
0
votes1
answer45
viewsHow to return the index of a java ARRAY
I have a little problem that I believe is logical but I can not solve. Let’s assume that, I wrote a little algorithm that creates 10 panels and puts them next to each other, as shown below. JPanel…
-
0
votes1
answer88
viewsSpace between matrix number
Good evening, I’m new to the site and beginner in C Language ,I know only the basics for now,I have a question that I’m struggling if someone knows how to solve would be grateful. I’m taking the…
-
0
votes0
answers27
viewsPHP - using matrix for arithmetic operations taken from combobox
Well I don’t know if anyone has ever played a game with rank system, it’s pretty simple to link split expensive costs a price and it varies depending on the link, for example each tyer on iron is…
-
0
votes0
answers40
viewsHow to create a dynamic layout of equations system on android
I’m creating an application for Android that solves systems of linear equations in which the user defines the number of equations, and generates a system of Equations, where the user needs to define…
-
0
votes2
answers171
viewsHow to show values of an Array in a single message?
package Algoritmos; import javax.swing.*; public class testinho { public static void main(String[] args) { int[][] numero_conta = new int[3][3]; numero_conta[0][0] = 111; numero_conta[0][1] = 222;…
-
0
votes2
answers180
viewsReceive data in a matrix c#
Hello, I was testing code to learn how to mess with the matrix, but I’m not able to store broken numbers in the variable. he of the error of System.IndexOutOfRangeException and I can’t solve.…
-
0
votes2
answers1000
viewsFill in a matrix and add up your numbers
I need to make a program (MATRIX) that performs the sum of all elements of a 10x10 matrix, containing integers. But I’m not able to add or put values in all elements of the matrix. As I do not use…
-
0
votes1
answer194
viewsRepeated element within matrix - Pascal
I have been trying for a long time to produce a code that identifies and reports to the user if there are repeated elements in a 5x5 matrix, composed of random numbers, in the pascal. I’ve tried…
-
0
votes1
answer210
viewsHow to show all values of three matrices in a single message without using indexes
package AlgoritmosII; import javax.swing.*; public class Trabalho1 { public static void main(String[] args){ String[][] A = new String[3][3]; int[][] B = new int[3][3]; double[][] C = new…
-
0
votes1
answer86
viewsdisplay multiple array by messagebox.Show on c# by clicking a button
people are creating a program to consult suppliers(being N suppliers), and I need that by clicking the button can see all registered suppliers and their information as this below : nomefornecedor1…
-
0
votes1
answer60
viewsHow to know the intensity of pixels in a given row or column of a cv::Mat?? [opencv][c++]
I have a project where there is a need to analyze the intensity of the pixels of a certain column or row, that is, my function will be Intensity(cv::Mat m, int ref, Std::string "lico") with a…
-
0
votes1
answer224
viewsHow do I save an array to a . txt file in Java the same way it appears in the console?
I made a code that generates a square matrix N x N with random numbers. So far ok. I made a method to record this matrix in a file .txt, only that the matrix simply comes out with random values,…
-
0
votes2
answers436
views1) Read a 10 x 10 matrix and write the location (row and column) of the highest value
CHALLENGE OF THE QUESTION 1 | Now, do not forget to inform which is the position of this higher value. There’s no way I can show the position of the highest value: from random import randint…
-
0
votes1
answer209
viewsFunction that transposes a matrix, using passage by reference
I need to do a function that by passing a matrizA by reference, the matrizA would turn the transpose of the matrizA. I tried using an auxiliary matrix, only it’s not working. It has to be a 5x5…
-
0
votes1
answer34
viewsHow to group two indexes in a tuple?
I want to group two indices that are received from positions that are results of if’s/Elif’s def MakeListOfFreeFields(board): n_rows = len(board) n_cols = len(board[0]) tfields = () for row in…
-
0
votes3
answers227
viewsHandling of JAVA arrays
Good morning, I am developing a very simple stock system where the items will be stored in a matrix follows code: package main; import java.io.Console; import java.util.Arrays; import…
-
0
votes1
answer23
viewsWhy does the matrix not exist outside the scope of readMatriz()?
I’m learning better C++ for marathons and I’m starting to use more methods instead of doing everything on main(), I need to read an array but I’m having trouble doing it through a method because…
-
0
votes2
answers740
viewsMultiply a matrix by a vector
I need to make a program that multiplies a 3x3 matrix by a vector 3, and store the result in a new vector. But I can’t get the result and the problem is probably multiplication. public static void…
-
0
votes1
answer1084
viewsSum of the elements of the secondary diagonal of a matrix
I made a program that the user declares the size of the matrix, and the matrix numbers are random. But in the sum part does not work and displays many errors. Java public static void main ( String[]…
-
0
votes1
answer44
viewsHow to use function to sum 3 matrices
I’m having trouble creating a function. I have my program ready, but I’m doing an exercise where the function is mandatory and I’m not getting. Java public static void main(String[] args) { Random…
-
0
votes1
answer93
viewsThis method must Return a result of type int[][]
I’m trying to do this matrix multiplication function but it’s giving error. Shows that the error is mult(int row, int column, int Linha2, int column2, int[][] matrix, int[][] matriz2) and says 'This…
-
0
votes1
answer50
viewsMultiplication of 3 matrices
I have to multiply three matrices with the validation that you can actually do, in one function. I’m trying to do matrix 1 and 2 first and get the result to do the 3. But it’s going wrong and also I…
-
0
votes2
answers59
views -
0
votes1
answer46
viewsMatrix in C language, error zsh: abort
I’m trying to create a matrix to read the names of 5 students. #include <stdio.h> #include <stdlib.h> int main(void){ //Programa para calcular a média das notas de 5 alunos, sendo que…
-
0
votes1
answer49
viewsCan someone help me with this exercise?
EXERCISE: Write a function that returns the number of the team that is in the lead. Leadership is determined by the team that has the most points won. If one or more teams have the same number of…
-
0
votes0
answers59
viewsProgram that Tells how many repeated numbers you have in the column and row of an array
To simplify, I have to make this ex: **Write a program that reads two sequences of ten integer numbers and prints on screen how many of these numbers are present in the two sequences and how many…
-
0
votes0
answers23
viewsUse the matrix of one method in another method to change its values
I’m doing a job that involves manipulating images in java ( I use Intellij) for my degree. I present below my code and what I would like to do is apply the operations of method alineaC in the matrix…
-
0
votes1
answer30
viewsTransposed matrix that takes non-integer and fractional values
I’m solving an exercise where I type values for a matrix 3x3, the print and also display its transpose. The problem is that I am not able to receive fractional values, and comma numbers. The code I…
-
0
votes1
answer222
viewsPrint array of names in C++
I’m having trouble printing an array that has as elements a char 'Name' saved. When I print these elements, only the last letter of the char leaves, in this case, the letter 'and', and not the whole…
-
0
votes0
answers25
viewsMy matrices do not appear on the screen in C
I need to make a memory game and I’m in the first part of it, where you need to create a null board and then distribute pairs of numbers in random positions. What I did is give the user 3 options:…
-
0
votes0
answers32
viewsDimensions must be Equal, but are 3 and 5 for...with input shapes: [32,3], [32,5]
I’m building a neural network, and I find the following mistake: ValueError: Dimensions must be equal, but are 3 and 5 for '{{node mean_absolute_error/sub}} =…
-
0
votes1
answer86
viewsCan anyone help me choose a specific line from the matrix ? (c/c++ language)
I’m doing an activity and she says: (function - matrix and vector) Design a program that reads a 4x4 matrix and creates a 4-element vector consisting of the elements of a matrix line chosen by the…
-
0
votes1
answer93
viewsUse if with matrices
The question ends up being logically easy, but I’m having difficulty knowing how to use the if condition in the values of the matrix, I don’t know how to do to mess with the values of the matrix. my…
-
0
votes0
answers37
viewsGenerate specific numbers in the matrix
So the question is a 4x4 matrix with 0s and 1s, but I was wondering if there’s any way I could get the matrix to print 0s and 1s in random orders, I just don’t know how and I was wondering if…
-
0
votes1
answer37
viewsFilter string array in C and count how many repeat
The program makes car rentals, it takes license plate and the type of car, both stored in two different matrices, as I do to get only the license plates of the luxury type cars. Code I’ve made so…
-
0
votes1
answer45
viewsLOWEST VALUE OF EACH MATRIX ROW
I need to find the lowest value of each matrix row. The values appear missing or the most (much more). What I have so far: #include <stdio.h> #include <stdlib.h> int main() { float…
-
0
votes0
answers57
viewsMean of matrix columns
The code is wrong to print the average and fill the second matrix. The code: #include <stdio.h> #include <stdlib.h> int main() { float matriz[3][6]; float SomaImp = 0, SomaDQ = 0, SomaPS…
-
0
votes2
answers221
viewsJAVA - How to compare columns of an int[][] array
I have to compare the rows and columns of an array and know if they repeat themselves. To compare the lines, it was "easy", but I’m picking to compare the columns. To solve temporarily I am…
-
0
votes1
answer37
viewsHow does the diagonal sum printf of a matrix
I’m having a hard time creating a printf that depends on the input. I want you to print depending on how many numbers you have diagonally in a matrix and display those numbers. EXAMPLE: You must…
-
0
votes1
answer27
viewsHow do I get the spaces just from the last column of the matrix?
Iai galera, so my code is already working perfectly, but in the last column it also gives a space, but I do not want this space there, as I do to remove it? Leaving only spaces between numbers.…
-
0
votes1
answer77
viewsBINGO game in C , Using matrix with 3 dimensions?
How can I generate some (detail: plural) random cards with numbers, but need to manipulate them as a three-dimensional matrix. Cartela[players] [n] [n] .. n = The dimension My program generates only…
-
0
votes1
answer77
viewsRemove row and column numbering from the Dataframe of an Array
I am making a program that reads a table in CSV and transforms it into an array in python using pandas, I was able to transform it but Dataframe numbered the rows and columns and I wish to delete…
-
0
votes0
answers96
viewsError: subscripted value is neither array nor Pointer nor vector
What am I doing wrong in this code of mine to be making this mistake? Statement: Given the Matrix A = {{10, 30, 50}, {5, 15, 25}, {2, 5, 9}} and the Matrix B= {{5, 35, 70}, {1, 25, 30}, {1, 4, 7}},…
-
0
votes2
answers39
viewsPicking a vector within an R matrix
I’m doing an exercise* for my R studies and I’m not able to properly manipulate matrices. The problem is very simple, apparently. I have a matrix’m' m <- rbind( c(1,1), c(1,2), c(3,3), c(2,0)),…
-
0
votes1
answer30
viewsHow to add more values in a numpy matrix?
I am doing a program in python that uses matrices, I am using numpy to do them, but it is giving the following problem: I do the matrix in order to save several values, but it keeps only one. I was…
-
0
votes0
answers37
viewsI’m having trouble storing a value in the C struct
When it comes to printing, they are somehow superimposed. I have no idea what it might be. The FOR is strange because it is necessary that Tsala data[FLOOR][ROOM][TURN] be this way and in that…
-
0
votes1
answer53
viewsString array printing error // C++
I am making a force and in the printing of the drawn word, there is an error in which the words are printed with some numbers or letters not included in its scope. const int quant_palavras = 3;…
-
-1
votes1
answer6781
viewsHow to sum the values of each row of a matrix?
How to sum the values of each row of a matrix and store the sum in one array? Example: 3 3 3 2 3 4 2 2 2 Results in: 9 9 6