initial commit
change size(opts.truncate) to numel(opts.truncate) to grab any vector/scalar coming in.
added error checking for opts.tuncate's length.