From: Keith on
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)

But then I get the following message:

"For time domain data, the value of the "Ts" property must be a positive number, or an empty matrix to
denote irregular sampling."

Its like its not even reading that I put in an empty Ts matrix! I've also tried various syntax combinations, such (y_u,u,'ts',[],'sa',time, etc.) Has anyone ever come across this before? Thanks.

Keith
From: Greg Heath on
On Feb 26, 9:24 am, Keith <kdt...(a)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