Index exceeds matrix dimensions.

3 ビュー (過去 30 日間)
gonçalo saial
gonçalo saial 2019 年 4 月 26 日
コメント済み: gonçalo saial 2019 年 4 月 26 日
In my program i have this error: "Index exceeds matrix dimensions. Error in codigo (line 38) air(a) = (aig(a)*2*pi)./360;"
How can I fix that? Thanks in advance!
a=0;
b=0;
while a~=46;
a=a+1;
while b~=0;
air(a) = (aig(a)*2*pi)./360;
b=b-1;
end
b=20;
end

採用された回答

James Tursa
James Tursa 2019 年 4 月 26 日
編集済み: James Tursa 2019 年 4 月 26 日
What is numel(aig)? Seems like aig doesn't have 45 elements.
  1 件のコメント
gonçalo saial
gonçalo saial 2019 年 4 月 26 日
The 'aig' is a variable, is an angle in degrees.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by