How to use multiple formats

5 Ansichten (letzte 30 Tage)
dbh0031
dbh0031 am 17 Sep. 2015
Kommentiert: Star Strider am 17 Sep. 2015
My teacher is asking me to use 8 different formats. I've tried everything I could think and even read the textbook. If anyone could show me how to use multiple formats to get more than one answer that would be great! Thanks

Antworten (1)

Star Strider
Star Strider am 17 Sep. 2015
Bearbeitet: Star Strider am 17 Sep. 2015
If you need ideas, see the documentation in fprintf for formatSpec. That has all the available options. The creativity is your responsibility. (You might also need the str2num or num2str functions, depending on the requirements of your assignment.)
  2 Kommentare
dbh0031
dbh0031 am 17 Sep. 2015
For some reason she's only letting us use format long or format shorteng for example. My professor won't let us use fprintf till the next assignment
Star Strider
Star Strider am 17 Sep. 2015
I didn’t know you meant that definition of ‘format’. See the documentation on format for details, specifically the style documentation.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Characters and Strings 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