write a fuction that determines

조회 수: 2 (최근 30일)
ALI GUNES CETIK
ALI GUNES CETIK 2016년 12월 27일
댓글: Image Analyst 2016년 12월 30일
in europe, daylight time starts on the last sunday of march and ends on the last sunday of october.write a fuction that determines whether a given daynumber is in the summertime period or in the wintertime period of the daylight saving time.
  댓글 수: 2
Stephen23
Stephen23 2016년 12월 27일
편집: Stephen23 2016년 12월 30일
What have you tried so far?
If you submit other people's work as your own work this is plagiarism, a very serious offence in most countries. We are volunteers who help answer questions about using MATLAB. What is your question about MATLAB?
adi kul
adi kul 2016년 12월 27일
No one is going to write it for you! Show us what you have done, and people over here will help you to solve any error!

댓글을 달려면 로그인하십시오.

답변 (1개)

Steven Lord
Steven Lord 2016년 12월 27일
If this IS NOT part of a homework assignment, call the isdst function with a datetime object that has a nonempty TimeZone property as input.
If this IS part of a homework assignment, Stephen and Adi are correct. If you show what you've done and ask a SPECIFIC question you may receive some guidance. [You may also want to use the isdst function to check your code; provide equivalent days to your function and to isdst and confirm their answers agree.]
  댓글 수: 1
Image Analyst
Image Analyst 2016년 12월 30일
From what I see, the question, even if homework, does not specifically prohibit the use of isdst() or other built-in functions, so I think it's possible to use isdst() as part of the solution. Some automated/computerized graders simply put in test inputs and look at test outputs to see if they're correct and never really examine what's going on inside. Though, doing it the "manual" way instead of using isdst() might be a good learning experience.
To get the user input (the date) one might use inputdlg().

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by