Not enough input arguments error in function
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi there,
I'm trying to use a function in matlab, but everytime i adress a variable that is given to my function, the failure: "Not enough input arguments" will occure.
My code is:
function[Szenario] = Szenarioerkennung(Kommentartrennung)
compare = strcmp(Kommentartrennung{1,1},'CPFA');
if compare == 1
...
end
The issue seems to be the variable Kommentartrennung, because I can't adress is in any way (like: a=Kommentartrennung) the same error will occure every time. However I can adress the variable in the original program where it is declared. If I type "Kommentartrennung{1,1}" in the Command Window, it will show 'CPNA' like it should.
My function ist saved as Szenarioerkennung.m.
Kommentartrennung is a table (but I also tried to convert is to array, cell and structure with the same result).
2 Commenti
Adam
il 18 Lug 2019
How are you calling the function? You need to pass that variable in when you call it.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Containers 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!