MATLAB Answers

Martin
0

How to reverse a duration?

Asked by Martin
on 28 Aug 2018
Latest activity Answered by Kevin Chng on 28 Aug 2018
e.g. c = minutes(2) gives a duration variable: c = 2 min... How to reverse it and get just an integer of 2 ?

  0 Comments

Sign in to comment.

2 Answers

Stephan
Answer by Stephan
on 28 Aug 2018
Edited by Stephan
on 28 Aug 2018
 Accepted Answer

Hi,
doing the same with a duration gives a double:
a = minutes(2)
whos a
b = minutes(a)
whos b
See also here:
Best regards
Stephan

  1 Comment

Martin
on 28 Aug 2018
that was pretty simple lol thanks

Sign in to comment.


Answer by Kevin Chng on 28 Aug 2018

c = minutes(2) minutes(c)
it will give you back the integer....

  0 Comments

Sign in to comment.