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 .
댓글 수: 0
채택된 답변
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 Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!