I've been using Matlab's time series toolbox [tstool](http://www.mathworks.com/help/matlab/ref/tstool.html) to calculate the correlation between two time series, this works perfectly and gives me very informative graphs.

What I need to do is generate such correlation plots for a larger number of vectors, thus from within a script, I've read that `tstool` uses the `xcorr` function but I haven't found how to use it to produce results similar to tstool's.

Is there a way to look at the script wchich generates the correlation plot in the tstool GUI?

Or a way to call ts tools from a script something like:

```
ts = new tstool;
ts.corrplot(A,B)

```

Or some other way to produce tstool like correlation graphs, I'm interested in the lag scale especialy, in a script?