subject

Write a user-defined matlab function that determines the time elapsed between two events during a day. for the function name and arguments, use dt = timediff(ta, ap1, tb, ap2). the input arguments to the function are: § ta is a two-element vector with the time of the first event. the first element is the hour and the second element is the minute. § ap1 is a string ‘am’ or ‘pm’ which corresponds to the time of the first event. § tb is a two-element vector with the time of the second event. the first element is the hour and the second element is the minute. § ap2 is a string ‘am’ or ‘pm’ which corresponds to the time of the second event. the output argument dt is a two-element vector with the time elapsed between two events. the first element is the number of hours and the second element is number of minutes. the function returns the output as an error message if the time entered for event b is before the time entered for event a. this can be done by assigning an error message to dt. use the function to determine the time elapsed between the following events: a) event a: 5: 37am; event b: 2: 51pm. b) event a: 12: 53pm; event b: 6: 12pm. c) event a: 11: 32pm; event b: 3: 18pm. (error situation.)

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 23:00, pinkyglitter2696
Give an example of a case where a two-way handshake to establish a connection could leave one side of the connection live while the other side does not believe there is a connection.
Answers: 1
image
Computers and Technology, 22.06.2019 01:30, gabriieldelacruz16
What “old fashioned” features of checking accounts is p2p replacing
Answers: 3
image
Computers and Technology, 22.06.2019 06:50, wtfcmd
Match the personality traits with their description
Answers: 1
image
Computers and Technology, 22.06.2019 17:00, DRock4976
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen too
Answers: 2
You know the right answer?
Write a user-defined matlab function that determines the time elapsed between two events during a da...

Questions in other subjects: