printf

版本 1.0.0.0 (2.3 KB) 作者: Petter
Multiple file pointers. List printing features. Merged fprintf and sprintf.
264.0 次下载
更新 2012/11/30

查看许可证

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.

引用格式

Petter (2026). printf (https://ww2.mathworks.cn/matlabcentral/fileexchange/39213-printf), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2011b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Use COM Objects in MATLAB 的更多信息
版本 已发布 发行说明
1.1.0.0

Just a change in the description.

1.0.0.0