gives error index exceeds the number of array elements (33).

2 ビュー (過去 30 日間)
Hamza Khaliq
Hamza Khaliq 2020 年 3 月 16 日
コメント済み: Walter Roberson 2020 年 3 月 18 日
E=input('Enter E: ');
t=0:.01:2*pi;
G=64000;
while(E==0 || E== 1 || E == -1)
if E==0
r=G*t/2;
elseif E==-1
r=G.*(cosh(t)-1);
elseif E==1
r=G.*(1-cos(t));
end
plot(t,r)
E=input('Enter E: ');
end
  3 件のコメント
Walter Roberson
Walter Roberson 2020 年 3 月 16 日
What sequence of input values are you using for E ?
Check your workspace in case you accidentally have a variable named plot
Walter Roberson
Walter Roberson 2020 年 3 月 18 日
It appears that you were editing your quesiton at the same time I was posting my comment, so you might not have seen my comment.

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

回答 (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