Index exceeds matrix dimensions. Error in HW2 (line 82) CL(i) = a(i)*(AOA(i) - alp0);

1 次查看(过去 30 天)
I am trying to create a plot with multiple varying functions but i keep getting the error that the index exceeds the matrix dimensions.

采纳的回答

Walter Roberson
Walter Roberson 2018-1-20
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 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by