Month function - License checkout failed

1 次查看(过去 30 天)
Hello
I am having an issue when i use the month() function from my GUI made in designer. When i call the function in the Command Window, it works fine, but when my GUI calls it, it says somthing about my license for Financial_Toolbox has expired. I have never used the toolbox and i did not think month() was a part of it. I get the following error
License checkout failed.
License Manager Error -10
Your license for Financial_Toolbox has expired.
If you are not using a trial license contact your License Administrator to obtain an updated license.
Otherwise, contact your Sales Representative for a trial extension.
  1 个评论
Walter Roberson
Walter Roberson 2019-11-28
month() is part of the Financial Toolbox.
But possibly you are using a datetime object: month() is also a method for datetime objects.
Is it possible that you are using load() inside the function that is having problems, and that you are are not assigning the result of load to a variable?
Or is it possible that the thing you are taking month() of is ending up as [] ?
Time to use the debugger.

请先登录,再进行评论。

回答(1 个)

Chidvi Modala
Chidvi Modala 2020-1-3
“month” function is present in both MATLAB and Financial toolbox. Distinguishing the datatime method called “month”, from the Financial Toolbox function “month” requires knowing the input type. The analysis tracks variable types, but not for temporary variables without a name. If the datatime object is assigned a name, the analysis will correctly deduce the type and therefore calls the “method” function you require
You can make use of following code and it does not report a Finance Toolbox dependency
d = datetime(date);
thismonth = month(d);
  2 个评论
Walter Roberson
Walter Roberson 2020-1-3
Wuhhh???
How about cases like
foo.d = datetime(now);
thismonth = month(foo.d);
Is foo.d a temporary variable without a name?
This calls for more testing...
Walter Roberson
Walter Roberson 2020-1-3
I'm liking my speculation of a load() without an assignment better. My testing so far is not consistent with the explanation of temporary variables versus named variables. On the other hand, I do not have any expired toolbox licenses to test with.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Manage Products 的更多信息

标签

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by