printf

Version 1.0.0.0 (2,35 ko) par Petter
Multiple file pointers. List printing features. Merged fprintf and sprintf.
264 téléchargements
Mise à jour 30 nov. 2012

Afficher la licence

A wrapper around fprintf and sprintf with the following features:
* Print to multiple file pointers.
* Append directly to files (given file name).
* Return the output as a string.
* Flexible support for printing lists.

Example:
>> s = printf({1,'foo.log'}, 'len(c)=%d, c=[%s].\n', length(c), {'%g', ' ', c});
len(c)=3, c=[3.14 1 15].
>> s2 = printf('<%s>', {[1 3 4 5]})

s2 =

<1, 3, 4, 5>

>>

Also append the printed text to file foo.log, and return it (incl the line break) to s.

Citation pour cette source

Petter (2025). printf (https://fr.mathworks.com/matlabcentral/fileexchange/39213-printf), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2011b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Use COM Objects in MATLAB dans Help Center et MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Publié le Notes de version
1.1.0.0

Just a change in the description.

1.0.0.0