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

 채택된 답변

Les Beckham
Les Beckham 2020년 7월 8일
편집: Les Beckham 2020년 7월 8일

0 개 추천

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개)

카테고리

도움말 센터File Exchange에서 Time Series Objects에 대해 자세히 알아보기

태그

질문:

2020년 7월 7일

편집:

2020년 7월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by