change char class to string class
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
How to change the output from char class to string class ?
function Out=bestSection(Number,Letter,Grades)
[~,ind]=max(Grades);
Out=[num2str(Number(ind)),Letter(ind)];
end
1 Commento
Stephen23
il 18 Giu 2020
The most robust and efficient solution is to use sprintf, which also lets you specify the numeric conversion format.
Risposta accettata
madhan ravi
il 18 Giu 2020
Modificato: madhan ravi
il 18 Giu 2020
doc string
doc compose % after Stephen's comment , make sure to use "" - double quotes
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Characters and Strings 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!