# Using lists to access tensors like in MATLAB

I have a tensor of a variable size as an input to a function in which I need to access specific elements. Because the order of this tensor is variable, notation:

tensor[[i,j,k...]]


is not an option. In MATLAB I would have a solution to the effect of:

access_array = [a,b,c,d,...];
tensor(access_array)


however this type of solution does not seem to work in Mathematica, and the documentation does not propose an equivalent. Here is what I tried:

acc={a,b,c}
tensor[[acc]]


Thank you for your help, Slava

• Maybe Extract[] is more appropriate for you than Part[]? – J. M.'s technical difficulties Jul 26 '17 at 15:24