採用された回答

Sean de Wolski
Sean de Wolski 2011 年 2 月 4 日

0 投票

is 0 a "real positive integer"?
Unlike other languages, MATLAB begins indexing at 1. e.g.
x(0) => your_error
x(1) => indexes first element

1 件のコメント

jyothsna chennareddy
jyothsna chennareddy 2011 年 2 月 4 日
Thank you so much sir

サインインしてコメントする。

その他の回答 (1 件)

Vieniava
Vieniava 2011 年 2 月 4 日

0 投票

in Matlab vector/matrix indexing starts from 1, not from 0, so you should change for-loop starting value on 1 .

1 件のコメント

jyothsna chennareddy
jyothsna chennareddy 2011 年 2 月 4 日
Thank you mam

サインインしてコメントする。

カテゴリ

ヘルプ センター および File Exchange で Entering Commands についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by