Displaying 1 result from an estimated 1 matches for "newk".
Did you mean:
new
2011 Dec 29
3
Array element is function of its position in the array
I want to create a new array which selects values from an original array
based on a function of the indices. That is:
I want to create a new matrix Vnew[i,j,k]=Vold[i,j,ks] where ks is a
function of the index elements i,j,k. I want to do this WITHOUT a loop.
Call the function "ksfunction", and the array dimensions nis,njs,nks. I can
do this using a loop as follows:
# Loop version: