Getting the a day of a month based on Vac(day,month)
조회 수: 2 (최근 30일)
이전 댓글 표시
Currently, I'm trying to write a program to get both day and month information and as a result, show how the month x list will be arranged if it starts with the given number. For example, I could get this with (31.3), but my problem is that I cannot make it dynamic based on numbers and the start of the month doesn't change. Would it be better to write it with a 1D array?
day = input(promptDay);
nday = input(promptNday);
x = zeros([1,35]);
Cnt = 1;
for i = day:nday+day - 1
for j = 1:5
for k = 1:7
if x (j*k) == 0
disp(' ')
else
disp (x(j*k)
if [i] == zeros
disp(' ')
x (i) = Cnt;
Cnt = Cnt + 1;
end
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calendar에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!