Filter löschen
Filter löschen

why fprintf have a double class but sprintf have char

3 Ansichten (letzte 30 Tage)
Muhannad AL-hazmi
Muhannad AL-hazmi am 21 Apr. 2021
Beantwortet: Steven Lord am 21 Apr. 2021
when i write in fpritnf then i see what class it's it show a double but why is that ?
  1 Kommentar
James Tursa
James Tursa am 21 Apr. 2021
Please post the actual code you are using and the output you are seeing.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Steven Lord
Steven Lord am 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."

Weitere Antworten (0)

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by