Questions tagged as 'matrices'

2
answers

Define list within matrix

I would like to be able to create a variable that was an N x N matrix and that each of the positions in the matrix would be a list of two elements. and be able to assign them in a similar way to this, within a for loop: matriz[1][2]=...
asked by 10.04.2017 / 15:46
3
answers

Android Studio, problem with matrix [N] x [N]

I'm sorry to bother with the query, I have 1 data matrix, and a vector where I save the images. I fill the matrix myself entering the data, and I can not understand why the code does not work because I assign it a different place than the one sh...
asked by 06.12.2018 / 16:08
1
answer

Read from a file and assign to array [] [] in Java [closed]

How to read a txt file with an 8x11 matrix that has several char and put it in char [][] ? The txt can have this form: %,%,%,%,%,%,%,%,%,%,% %,%,%,h,o,l,a,%,%,%,% %,%,%,%,%,%,%,%,%,%,% %,%,%,m,u,n,d,o,%,%,% %,%,%,%,%,%,%,...
asked by 03.12.2016 / 18:59
1
answer

Change the order of the columns - rows of an R matrix

I need to add to this matrix a row of 0 (zeros) above and a column of 0 on the left. I tried to do it like this ... R <- rbind(Hxx, 0) R <- cbind(R, 0) ... but I add the row and column at the end. When I had the...
asked by 18.11.2016 / 13:06
1
answer

Multiply the same Matrix by N times

I am trying to multiply a matrix using numpy by itself N times, this is my current code import numpy as np fil1=3 col1=2 mat1 = random.random((fil1,col1)) mat3 = np.zeros((fil1,col1)) iter = 2 print('Matriz A:\n',mat1) for r in range(0,fil1)...
asked by 25.09.2018 / 08:27
1
answer

List of lists of random numbers python

I want to know how to implement the matrizAleatoria(a) function, which completes the list of a lists with random numbers using random.random() (the function does not return anything, you only have to modify a) I wrote the...
asked by 23.10.2018 / 22:01
2
answers

How to return a matrix in C?

My problem is a matrix declared in a function as I do to have the values of the matrix in a second function that prints it, something like this: #include<stdio.h> #include<conio.h> #include<time.h> void main(){ int m,n; print...
asked by 04.07.2018 / 02:06
1
answer

Names of rows in an array in R

I have an array that looks like this: LH_CV 0.044919900 LH_IQ 0.457549906 LH_Kur 0.007265657 LH_Max 0.572179944 LH_Mean 0.592315043 LH_Min -0.053051707 LH_Mode 0.352844542 LH_P01 0.107923404 LH_P05 0.292272397 LH_P10 0.35697...
asked by 03.07.2018 / 12:11
1
answer

Browse array 1 dimension, intermediate code (3 addresses) C ++

Good evening, I am programming a soup of letters in c ++ with intermediate code or three addresses and then pass it to the GUI TASM assembly. What the program should do is print a one-dimensional array with the letters, and move around the array...
asked by 21.11.2017 / 07:54
1
answer

Numpy Exercise (Python) [closed]

Good morning, I have to do the following exercise with python using the numpy package (I do not have loops or anything like that): Construct an array in which the value of the elements equals the sum of its row plus its column. Is ther...
asked by 20.09.2017 / 10:40