Using fprintf to display multiple strings
Mostra commenti meno recenti
This piece of code
fprintf('%s + %s',char(955))
should give me λ+λ but it only gives λ +
How should I solve this?
Risposte (2)
KSSV
il 27 Lug 2020
fprintf('%s + %s',char(955),char(955))
Very simply add an identifier to the format specifier:
fprintf('%1$s + %1$s',char(955))
% ^^ ^^ input identifiers
The identifier tells MATLAB which input to use. See:
Categorie
Scopri di più su Entering Commands in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!