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 ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by