Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
Hamza Khaliq
Hamza Khaliq am 16 Mär. 2020
Kommentiert: Walter Roberson am 18 Mär. 2020
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 Kommentare
Walter Roberson
Walter Roberson am 16 Mär. 2020
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 am 18 Mär. 2020
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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by