Re: Got error when using AR function




"Taylor Tain" <taylor2765@xxxxxxxxx> wrote in message
news:g1i60q$fmq$1@xxxxxxxxxxxxxxxxxxxxx
Hi everyone,

I follow an example in the Help:

y = sin([1:300]') + 0.5*randn(300,1);
y = iddata(y);
mb = ar(y,4,'burg');
mfb = ar(y,4);
bode(mb,mfb)

I don't know why the following error message pop up:

??? Error using ==> subsindex
Function 'subsindex' is not defined for values of class
'iddata'.

Any idea?

The literal meaning of the error message is you're trying to use an iddata
object as an index into a variable, but you haven't define how to convert
the object into a set of indices (that's what SUBSINDEX does.)

In this case, you're not actually trying to use it as an index -- instead,
you likely have a variable named either ar or bode and the lines where you
try to call those functions are actually being treated as attempts to index
into those variables.

Set a breakpoint on the line where you call IDDATA and see which of those
variables you've created earlier in your code.

--
Steve Lord
slord@xxxxxxxxxxxxx


.



Relevant Pages

  • debugging problem
    ... I am trying to debug a matlab program. ... When I try to step using F10, ... I get the following error message: ... Function 'subsindex' is not defined for values of class 'struct'. ...
    (comp.soft-sys.matlab)
  • Re: Got error when using AR function
    ... Function 'subsindex' is not defined for values of class ... The literal meaning of the error message is you're trying ... Set a breakpoint on the line where you call IDDATA and see ... Steve Lord ...
    (comp.soft-sys.matlab)
  • Re: Error using resid in System Identification Toolbox
    ... I always get the error message ... Conversion to double from iddata is not possible. ... then the resid command ... I created an idmodel object and an iddata object. ...
    (comp.soft-sys.matlab)
  • Error message explorer.exe application error
    ... I just recently bought a Dell lap top with Windows XP. ... I've also had another error message pop up that says, ...
    (microsoft.public.windows.mediacenter)
  • how to redirect console error popup window to a text file..
    ... an error message pop up in the screen informing me that the job has failed. ... Prev by Date: ...
    (microsoft.public.windows.server.scripting)

Loading