How to print result in matlab?

2 views (last 30 days)
VIJAY
VIJAY on 31 Oct 2018
Answered: Stephen23 on 31 Oct 2018
I have to print from date to To date with day.For example
from date:31.10.18;
To date:3.11.18;
my require output is
31.10.18 Wednesday;
1.11.18 Thrusday;
2.11.18 Friday;
3.11.18 Saturday

Accepted Answer

Stephen23
Stephen23 on 31 Oct 2018
>> D1 = datenum('31.10.18','dd.mm.yy');
>> D2 = datenum('3.11.18','dd.mm.yy');
>> V = D1:D2;
>> datestr(V(:),'dd.mm.yy dddd')
ans =
31.10.18 Wednesday
01.11.18 Thursday
02.11.18 Friday
03.11.18 Saturday

More Answers (0)

Categories

Find more on Dates and Time in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!