Index exceeds the number of array elements (1)

1 次查看(过去 30 天)
I am working for writing a script for plotting the spp dispersion. I am modifying an existing .m file.
I have trouble with the following error:
Index exceeds the number of array elements (1).
Error in resonance (line 190)
fsrc1=exp(1i*(kinc(1)*Y+kinc(2)*X));
I wonder if someone can help me to find the uncorrect array .

采纳的回答

Jesús Zambrano
Jesús Zambrano 2021-1-2
Hi, please check if kinc indeed has at least two elements, because you are trying to get kinc(1) and kinc(2). Also, check the "1i" inside the exp.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by