Thanks to everyone for the quick response.
Here's the full code:
newfunction()
x = randn(100,1);
y = randn(100,1);
Xedges = [-Inf -2:0.4:2 Inf];
Yedges = [-Inf -2:0.4:2 Inf];
h = histogram2(x,y,Xedges,Yedges)
I tried 'clear all' as Chunru suggested.
Also folowed up with dbstop error; no further clues:
>> dbstop error
>> newfunction
Maximum recursion limit of 500 reached.
Error in newfunction (line 1)
newfunction()
Caused by:
Maximum recursion limit of 500 reached.