The sampling interval‘Ts’ is enough. Note that all your data must be sampled all with the same sampling interval. If they are not, you need to interpolate them to the same sampling interval with the resample function first.
I usually calculate the sampling interval as:
Ts = mean(diff(time));
For iddata, the output signal ‘data2’ is ‘y’, the input signal ‘data1’ is ‘u’, and ‘Ts’ is as I described it.