Effacer les filtres
Effacer les filtres

Seconds function in matlab2013

1 vue (au cours des 30 derniers jours)
nashat sawai
nashat sawai le 13 Juil 2020
Commenté : nashat sawai le 16 Juil 2020
I have matlab 2013b, I try to execute some of matlab scripts which are originally developed in newer versions 2014b, Functions "seconds" is induced 2014, and not existing in 2013, what is the the alternative function
  1 commentaire
madhan ravi
madhan ravi le 13 Juil 2020
An excerpt?

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 13 Juil 2020
There is no alternative. seconds() creates a duration datatype, but that datatype did not exist in your release.
If you switched over to using serial date numbers, then you could define
seconds = @(x) x/(24*60*60);
but you would only be able to use it in limited circumstances, such as
t = now;
datestr(t)
datestr(t + seconds(180))
  1 commentaire
nashat sawai
nashat sawai le 16 Juil 2020
It works 👍

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by