Computers and Technology
Computers and Technology, 07.11.2019 21:31, kimhoss2

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.)

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:40, lazerlemon500
Write a modular program (no classes yet, just from what you learned last year), that allows two players to play a game of tic-tac-toe. use a two-dimensional char array with 3 rows and 3 columns as the game board. each element of the array should be initialized with an asterisk (*). the program should display the initial board configuration and then start a loop that does the following: allow player 1 to select a location on the board for an x by entering a row and column number. then redisplay the board with an x replacing the * in the chosen location. if there is no winner yet and the board is not yet full, allow player 2 to select a location on the board for an o by entering a row and column number. then redisplay the board with an o replacing the * in the chosen location. the loop should continue until a player has won or a tie has occurred, then display a message indicating who won, or reporting that a tie occurred. player 1 wins when there are three xs in a row, a column, or a diagonal on the game board. player 2 wins when there are three ox in a row, a column, or a diagonal on the game board. a tie occurs when all of the locations on the board are full, but there is no winner. input validation: only allow legal moves to be entered. the row must be 1, 2, or 3. the column must be 1, 2 3. the (row, column) position entered must currently be empty (i. e., still have an asterisk in it).
Answers: 1
image
Computers and Technology, 23.06.2019 03:00, tay9122
Jason, samantha, ravi, sheila, and ankit are preparing for an upcoming marathon. each day of the week, they run a certain number of miles and write them into a notebook. at the end of the week, they would like to know the number of miles run each day, the total miles for the week, and average miles run each day. write a program to them analyze their data. your program must contain parallel arrays: an array to store the names of the runners and a two-dimensional array of five rows and seven columns to store the number of miles run by each runner each day. furthermore, your program must contain at least the following functions: a function to read and store the runners’ names and the numbers of miles run each day; a function to find the total miles run by each runner and the average number of miles run each day; and a function to output the results. (you may assume that the input data is stored in a file and each line of data is in the following form: runnername milesday1 milesday2 milesday3 milesday4 milesday5 milesday6 milesday7.)
Answers: 3
image
Computers and Technology, 23.06.2019 06:20, Ab20600
Which text function capitalizes the first letter in a string of text? question 10 options: upper capital first proper
Answers: 1
image
Computers and Technology, 24.06.2019 01:00, Timeisjesus
Answer these and get 40 points and brainliest
Answers: 1
Do you know the correct answer?
Write a user-defined matlab function that determines the time elapsed between two events during a da...

Questions in other subjects: