フィルターのクリア

error: Too many input arguments.

1 回表示 (過去 30 日間)
lulu
lulu 2022 年 11 月 13 日
回答済み: Piyush Dubey 2023 年 9 月 1 日
Acually I want to use vr(j,n),ur(j,n),ul(j,n), vl(j,n) in the loop of (i+k*ds)... how I can define vr(j,n),ur(j,n),ul(j,n), vl(j,n) so the loop can replace j with (i+k*ds) or (1-(+k*ds)).. kindly help me.see the attached please.
  1 件のコメント
lulu
lulu 2022 年 11 月 13 日
編集済み: Torsten 2022 年 11 月 13 日
I tried another way but stil I faced error. See the attached please. thank you

サインインしてコメントする。

回答 (1 件)

Piyush Dubey
Piyush Dubey 2023 年 9 月 1 日
Hi lulu,
I understand that you are trying to use 2-dimensional indexing over a matrix in loop and getting an error stating “Too many input arguments”.
The code you have attached for reference is showing a scenario where the index value that is being used to access a value is non-integral. While trying to debug the code, I found the value of “ds” to be 0.01 during the first iteration and it is causing error in reading the matrix since i+k*ds or 1-k*ds” both turn out to be fractional values. Here, the index value should strictly be a non-negative integer.
For more information on “Matrix Indexing”, you can refer the following MathWorks documentation link: https://www.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html
I hope this helps!

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by