What goes before this?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Sean St Cyr
am 7 Jul. 2020
Bearbeitet: Les Beckham
am 8 Jul. 2020
Month = 'Feb';
Date = '18';
N = 49;
Stuff = ___ ('Feb 18 is the 49 day of the year.', Month,Date,N); %% WHAT GOES AFTER STUFF =
fprintf = ('%s\n',Stuff)
I am trying to figure out what would go here to make it print the "Feb 18 is the 49 day of the year" and i Cannot figure it out. Please help
0 Kommentare
Akzeptierte Antwort
Les Beckham
am 8 Jul. 2020
Bearbeitet: Les Beckham
am 8 Jul. 2020
You can change your 'Stuff =' line to the following:
Stuff = sprintf('%s %s is the %d day of the year.', Month,Date,N);
Or, you can replace that line and the following fprint line by this:
fprintf('%s %s is the %d day of the year.\n', Month,Date,N)
You should probably read the following documentation:
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Dates and Time finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!