why fprintf have a double class but sprintf have char
3 次查看(过去 30 天)
显示 更早的评论
when i write in fpritnf then i see what class it's it show a double but why is that ?
1 个评论
采纳的回答
Steven Lord
2021-4-21
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!