Undefined function or method for input arguments of type 'double'

6 ビュー (過去 30 日間)
Susan
Susan 2013 年 11 月 21 日
コメント済み: Bruno Pop-Stefanov 2013 年 11 月 21 日
I am getting the error:
??? Undefined function or method 'stockspec' for input arguments of type 'double'.
The function I am using is:
StockSpec = stockspec(.3,25);
I have tried entering the example exactly as seen on the documentation page http://www.mathworks.com/help/fininst/stockspec.html , and still receive an error:
??? Undefined function or method 'stockspec' for input arguments of type 'cell'.

回答 (1 件)

Bruno Pop-Stefanov
Bruno Pop-Stefanov 2013 年 11 月 21 日
Are you sure the Financial Instruments toolbox is installed on your machine? Type the following in the command window:
v = ver;
any(strcmp('Financial Toolbox', {v.Name}))
If the answer is 0, then it is not installed and you can't use stockspec.
  2 件のコメント
Susan
Susan 2013 年 11 月 21 日
I get 1 when I run that code. I have also been using other functions from that toolbox. However, when I type
help stockspec
into the command window, it says "stockspec not found"
Bruno Pop-Stefanov
Bruno Pop-Stefanov 2013 年 11 月 21 日
Sorry I made a mistake. The function is in the Financial Derivatives toolbox (derivtool) or the Financial Instruments toolbox (fininst). Check if either of them is installed. You can also click on the 'start' button at the bottom left corner of the main MATLAB window to get a list of the toolboxes installed.

サインインしてコメントする。

製品

Community Treasure Hunt

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

Start Hunting!

Translated by