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.

 채택된 답변

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])

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by