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 <email@example.com> wrote in message <firstname.lastname@example.org>... > 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 non-empty 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