フィルターのクリア

Array indices must be positive integers or logical values!

2 ビュー (過去 30 日間)
sarah Abdellahi
sarah Abdellahi 2019 年 5 月 9 日
コメント済み: Star Strider 2019 年 5 月 9 日
I have trained a regression model and now want to use it and get this error "Array indices must be positive integers or logical values". Here is the code
[RPMpred]=PredictRPM1sec(Tab_Pred_RPM(:,1:5));
and hereis my input array to the model
Capture.JPG
suggestions?
Thanks
  2 件のコメント
Stephen23
Stephen23 2019 年 5 月 9 日
@sarah Abdellahi: please show us the complete error message. This means all of the red text.
sarah Abdellahi
sarah Abdellahi 2019 年 5 月 9 日
Thats the complete error message. Here is a photo
Capture.JPG

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

採用された回答

Star Strider
Star Strider 2019 年 5 月 9 日
suggestions?
For one, post more of your code so the line you posted has a context.
I suspect that ‘PredictRPM1sec’ is an array, not a function, and if your ‘input array’ is what you posted in the image, those will be interpreted as subscript references. Note that none of them are integers, and some of them are negative.
  2 件のコメント
sarah Abdellahi
sarah Abdellahi 2019 年 5 月 9 日
YUP, had a typo in my code. your suggestion helpmed me find it.
Thanks
Star Strider
Star Strider 2019 年 5 月 9 日
As always, my pleasure.

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by