Index exceeds matrix dimensions. Error in HW2 (line 82) CL(i) = a(i)*(AOA(i) - alp0);
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Austen Thomas
el 20 de En. de 2018
Comentada: Walter Roberson
el 20 de En. de 2018
I am trying to create a plot with multiple varying functions but i keep getting the error that the index exceeds the matrix dimensions.
1 comentario
Respuesta aceptada
Walter Roberson
el 20 de En. de 2018
Your for 1:1:10 initializes a(1) to a(10). The loop after that is to length(k) which is 33 so it tries to use a(1) to a(33) but a(11) onwards does not exist
4 comentarios
Walter Roberson
el 20 de En. de 2018
for AR = 1 : 10
for i = 1 : length(k)
...
end
end
Más respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!