0
$\begingroup$

I have a list of Tables

Psilist = {psi0, psi1}

Where psi0 and psi1 are 2D tables. I would like to be able to call a specific element of the table in a specific element of the list. e.g. call element [[2, 2]] of the table in Psilist[[2]].

I have already tried

Psilist[[2]][[2, 2]]

as well as using a dummy variable. I want to store the tables in a list as I need to iterate through various time-steps and to do this need to use values from the previous matrix. Any solutions or workarounds would be appreciated.

$\endgroup$
1
  • 2
    $\begingroup$ tried Psilist[[2,2,2]]? $\endgroup$
    – kglr
    Commented Feb 14, 2020 at 2:41

1 Answer 1

2
$\begingroup$

What you tried should work. Without your full code, we cannot tell why you are having a problem.

Clear["Global`*"]

(psi0 = Array[p0, {3, 3}]) // MatrixForm

enter image description here

(psi1 = Array[p1, {3, 3}]) // MatrixForm

enter image description here

Psilist = {psi0, psi1};

Psilist[[2]][[2, 2]]

(* p1[2, 2] *)

Which is equivalent to

Psilist[[2, 2, 2]]

(* p1[2, 2] *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.