Why do I get "Too many input arguments" error when working in App Designer?
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MathWorks Support Team
il 8 Set 2023
Risposto: MathWorks Support Team
il 20 Set 2023
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?
Risposta accettata
MathWorks Support Team
il 8 Set 2023
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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Signal Integrity Kits for Industry Standards in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!