why fprintf have a double class but sprintf have char

4 ビュー (過去 30 日間)
Muhannad AL-hazmi
Muhannad AL-hazmi 2021 年 4 月 21 日
回答済み: Steven Lord 2021 年 4 月 21 日
when i write in fpritnf then i see what class it's it show a double but why is that ?
  1 件のコメント
James Tursa
James Tursa 2021 年 4 月 21 日
Please post the actual code you are using and the output you are seeing.

サインインしてコメントする。

採用された回答

Steven Lord
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 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by