The arrays x and y contain time values in the form of:
x = [hours minutes seconds]
Create the output z which contains the absolute difference in time between x and y in seconds.
x = [10 5 31];
y = [10 4 31];
z should be:
z = 60;
I added more test cases to make this problem less trivial.
Length of the hypotenuse
Summation of array
Convert yards to feet
Odd times 3
All odd - all even
How many complete pizzas
Odd times even numbers in a matrix
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office