time difference - MATLAB Cody - MATLAB Central

Problem 43060. time difference

Difficulty:Rate

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.

For example:

 x = [10 5 31];
 y = [10 4 31];

z should be:

 z = 60;

Solution Stats

64.0% Correct | 36.0% Incorrect
Last Solution submitted on Jan 02, 2025

Problem Comments

Solution Comments

Show comments
Why should you share code?
In a discussion on LInkedin about my recent blog post, Do these...
3
4

Problem Recent Solvers45

Suggested Problems

More from this Author25

Problem Tags

Community Treasure Hunt

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

Start Hunting!