Why do I get "Too many input arguments" error when working in App Designer?

7 ビュー (過去 30 日間)
I am getting the below error in the MATLAB command window when I am making some changes in my app designed using App Designer:
Error using MY_FUNCTION
Too many input arguments
I get the same error even when working on a new, blank app. How do I resolve this?

採用された回答

MathWorks Support Team
MathWorks Support Team 2023 年 9 月 8 日
This error is likely stemming from function shadowing. To confirm, run the below command.
which('MY_FUNCTION', '-all')
The function 'which' displays the full path of the files containing that function. Further information about this function can be found at the following location:
If the above command returns more than one result, and the MATLAB pre-written library is not on the top, then the custom function is getting precedence over the predefined one. This is true if you run in the Command Window or call it from App Designer.
The recommended long-term solution is to utilize a different name for the custom function to prevent future shadowing problems.
Alternatively, you can implement a quick temporary workaround by rearranging the MATLAB path hierarchy and placing the predefined file above the custom one to resolve the issue. To do so, please follow the below steps:
1) Click on the "Home" tab in MATLAB.
2) Click "Set Path"
3) Find the MATLAB pre-written library file from the list that is getting shadowed and select it.
4) Click "Move to Top"
5) Click Save

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSignal Integrity Kits for Industry Standards についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by