Passing char to a function?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello Experts,
Consider I have function test and I am putting in char A:
test(A). How to input char without '' and inside the function to determine what char is given. After recognition to decide what sub function to do.
Thanks in advance.
0 Commenti
Risposta accettata
Jan
il 15 Ott 2011
A strange question. Perhaps:
C = 'A';
test(C)
function test(S)
if strcmp(S, 'A')
disp('This has been an A');
end
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Language Support in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!