Returns information on the current stack. The usage is
where
The result is a kind of stack trace that indicates the state of the current call stack, and where you are relative to the stack.
Suppose we have the following chain of functions.
chain1.m function chain1 a = 32; b = a + 5; chain2(b)
chain2.m function chain2(d) d = d + 5; chain3
chain3.m function chain3 g = 54; f = g + 1; keyboard
The execution of the where
command shows the stack trace.
--> chain1 [chain3,1] --> where [0] -- <Interactive> [1] -- line 5 of file /home/basu/FreeMat2/help/mtex/chain1.m [2] -- line 4 of file /home/basu/FreeMat2/help/mtex/chain2.m [3] -- line 5 of file /home/basu/FreeMat2/help/mtex/chain3.m [4] -- <Interactive> [chain3,1] [chain3,1]
The double question marks mean that the context is not fully defined
for these cases. They usually mean that execution is in a keyboard
session or started from the -->
prompt.