i have a pretty simple task but for some reason i cannot for the life of me figure out how to do it in Python.
I have a matrix of numbers, this matrix has a variable number of rows depending on the dataset but always 30 columns. first things first i would like to create a new matrix of the same size. in this new matrix i would like the same value, say x, in every row but i different number, say x2 in each column. so each row will read x, x2, x3,...x30.
secondly i would like to multiple each number in the matricies together to form a third matrix, i.e. a(i,j) * b(i,j) = c(i,j)
i am much more used to visual basic programming albeit still not an expert. i made an attempt in Python
for i in range(a.referenceSize())
for j in range (2,30)
b(1,j) = 3000
b(i,j) = exp((log(a(i-1),j))-(0.317598))
i = i + 1
end # creates a second matrix, the same size as the input, with log scale 3000 to 0.3
for i in range (a.referenceSize())
for j in range (1,30)
c(i,j) = a(i,j)*b(i,j)
end # multiplies each value in matrix a with corresponding value in matrix b
but it comes back with all kinds of errors.
any help you could give would be greatly appreciated