"Index exceeds the number of array elements (11)."
Show older comments
Hi, Im pretty new to MATLAB and have come across this issue. Every time i run the script i get a message saying "Index exceeds the number of array elements (11).". Please could someone help?
disp = ('RLC Circuit')
R = input('R = ');
L = input('L = ');
C = input('C = ');
a = L*C;
b = R*C;
c = 1;
D = (b^2)-(4*a*c)
S1 = -b+(sqrt(D))/(2*a)
S2 = -b-(sqrt(D))/(2*a)
if D>0
disp('Over Damped')
elseif D==0
disp('Critically Damped')
else
disp('Under Damped')
end
Accepted Answer
More Answers (0)
Categories
Find more on Operators and Elementary Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!