Nobs range in estimation

Dear all,

Is there an easy way to make Dynare know the size of the observed data when read through an m-file without the user specifying it manually, so that one could set nobs using the last element of the data vector automatically, e.g. nobs=[dataLength-10:dataLength] to iterate forecasts over the last 10 observations, where dataLength could be automatically obtained by Dynare or set in an m-file?