Section: Inspection Functions
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.
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,4]--> where In /home/basu/dev/branches/FreeMat4/help/tmp/chain3.m(chain3) at line 4 In /home/basu/dev/branches/FreeMat4/help/tmp/chain2.m(chain2) at line 4 In /home/basu/dev/branches/FreeMat4/help/tmp/chain1.m(chain1) at line 4 In scratch() at line 2 In base(base) In base() In global() [chain3,4]