why fprintf have a double class but sprintf have char
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Muhannad AL-hazmi
il 21 Apr 2021
Risposto: Steven Lord
il 21 Apr 2021
when i write in fpritnf then i see what class it's it show a double but why is that ?
1 Commento
Risposta accettata
Steven Lord
il 21 Apr 2021
Because that's what they're documented to do.
The documentation for the sprintf function states "str = sprintf(formatSpec,A1,...,An) formats the data in arrays A1,...,An using the formatting operators specified by formatSpec and returns the resulting text in str."
The documentation for the fprintf function states "nbytes = fprintf(___) returns the number of bytes that fprintf writes, using any of the input arguments in the preceding syntaxes."
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!