I found this technique very useful. It seemed relevant to the discussion at
where I posted a comment referencing to this submission. Thanks.
Unfortunately in my hands this function only seems to work for x shorter than 300 elements.
x = 1:301
never generates a plot(i.e. the plot window never refreshes.)
For x=1:300 it works beautifully though.
Is there a simply way to make it work for longer x (e.g. 2500 points).