
Re: iddata irregular sampling time
Posted:
Sep 13, 2010 1:07 PM


Hi Greg,
Thanks for posting the solution. I've also read it from the Matlab documentation however, I still face a problem. Matlab keeps complaining that Ts needs to be specified even when I used the example given directly, i.e.
data = iddata(y,u,Ts,[],'SamplingInstants',TimeVector)
I'm sure I have all the variables correct except Ts because I cannot specify any scalar value for it since the interval is irregular. Furthermore, Matlab says Ts will be interpreted automatically as []. Why then does it still complain?
Appreciate any advice.
Best regards, Gab
Greg Heath <heath@alumni.brown.edu> wrote in message <bd8f3075728c4cba83565553c7ce4fb1@m37g2000yqf.googlegroups.com>... > On Feb 26, 9:24 am, Keith <kdt...@gmail.com> wrote: > > Hi all, > > I am trying to create a iddata variable in Matlab with inputs/outputs that I already have. The sampling interval, however, is irregular. When I put > > > > load('y_u') > > load('time') > > z=iddata(y_u,u,[]) > > > > (the [] is to denote an irregular ts), the following message appears: > > > > "If the value of the "Ts" property is empty, a nonempty value for the "SamplingInstants" property must > > be specified." > > > > Therefore, I put the following: > > > > load('y_u') > > load('time') > > z=iddata(y_u,u,[], 'SamplingInstances',time) > > The documentation states: > > BEGIN QUOTE > For nonuniformly sampled data, specify Ts as [], and set the value of > the SamplingInstants property as a column vector containing individual > time values. > For example: > > data = iddata(y,u,Ts,[],'SamplingInstants',TimeVector) > > Where TimeVector represents a vector of time values. > > END QUOTE > > Although the example doesn't seem to follow the directions, > considering this may help you figure it out. > > Hope this helps. > > Greg

