change char class to string class
Ältere Kommentare anzeigen
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 Kommentar
Stephen23
am 18 Jun. 2020
The most robust and efficient solution is to use sprintf, which also lets you specify the numeric conversion format.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!