Why do I receive an error when I run the example code in the SEGMENT function documentation in System Identification Toolbox 6.0.1 (R14)?

I tried to follow the example in the SEGMENT function documentation at the following location:
<http://www.mathworks.com/access/helpdesk/help/toolbox/ident/segment.shtml>
I typed in the following code in the MATLAB command window, but I received the following error message:
??? Error using ==> ones
Size vector must be a row vector with integer elements.

 Réponse acceptée

This bug has been fixed in Release 2008a (R2008a).
The example code at the end of the documentation should read as follows:
y = sin([1:50]/3)';
thm = segment([y,ones(length(y),1)],[0 1 1],0.1);
plot([thm,y])

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by