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.
Getting the indices from a vector
Close MATLAB with keyboard
Create incrementing array
Check if equal
Matlab Basics - Create a row vector
Connect 4 (the boardgame)
All odd - all even
How many complete pizzas
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