Undefined function 'year' for input arguments of type 'double'. <- on new 64bit pc with 64bit matlab installed

1 Ansicht (letzte 30 Tage)
Hi, if we type
MATLAB code
year(735142)
On any of our 32bit boxes we get ans = 2012
But on our new 64bit box we get Undefined function 'year' for input arguments of type 'double'.
Am I missing something silly here?
Cheers,
Tom

Akzeptierte Antwort

Jan
Jan am 13 Mär. 2012
The function year is contained in the Financial Toolbox, see: Web:doc year. If you did not install this toolbox on the 64 bit system, this function is not available. A work around:
function Y = myYear(D)
V = datevec(D);
Y = V(:, 1);
I do not have the Financial Toolbox. If this code equals the contents of the original year.m by accident, please post this as a comment, such that I can delete this code soon. :-)
  2 Kommentare
Jan
Jan am 13 Mär. 2012
Btw, you cannot find this information locally on your computer, because "doc year" is found only, if you have the toolbox installed. But Google finds the documentation on the TMW server for almost all Matlab functions as first match when searching for e.g. "Matlab year".

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by