Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How can I solve this MATLAB question? Write a script Time that will prompt the user to enter the current time as a vector of
How can I solve this MATLAB question?
Write a script Time that will prompt the user to enter the current time as a vector of two elements [hours minutes] and the time zone (HST, AKST, PST, MST, CST, and EST) as a string. Based on the values entered, the script must calculate and display the standard time in the other time zones based on the conversion of the given Table. If another time zone is entered, the program must display a message of invalid entry and ask the user to try again You can assume a 24-hour clock, so for example if the standard time in CST is [12 40], it would be [13 40] in MST, etc. see the Table below. The script must not display any negative times, for example if the HST time is 1:10 am it must be 24 in KST and 23 in PST, etc. Using fprintf, the output must be displayed as Time in HST is 1:40 Time in KST is 24:40, Time in PST is 23:40 Time in MST is 22:40 Time in CST is 21:40 Time in EST is 20:40 Use your script to find the following times in all time zones a) 2:30 pm in HST b) 10:50 pm in EST c) 2:20 am in KST d) 4:40 am in HST e) 1:10 am in FST (FST is not a predefined time zone) Table: Standard time and daylight saving time Time Zone Standard Time awaii HST (UTC-10:00) as Pacific Time Zone PST (UTC-08:00) Mountain Time Zone MST (UTC-07:00) Central Time Zone CST (UTC-06:00) Eastern Time Zone EST (UTC-05:00)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started