フィルターのクリア

Do my Toolboxes work?

2 ビュー (過去 30 日間)
Karl-Martin
Karl-Martin 2014 年 12 月 9 日
回答済み: Guillaume 2014 年 12 月 9 日
Hi,
I want to fit a Conditional Variance Model, given some specified data, using:
model = arima('ARLags',1,'Variance',garch(1,1))
fit = estimate(model,data);
Unfortunately, I get an error:
??? Undefined function or method 'garch'
for input arguments of type 'double'.
But the function 'garch' is part of the Econometrics Toolbox. When I ask for
>> ver
I get:
-------------------------------------------------------------------------------------
MATLAB Version 7.10.0.499 (R2010a)
MATLAB License Number: STUDENT
Operating System: Microsoft Windows 7 Version 6.2 (Build 9200)
Java VM Version: Java 1.6.0_12-b04 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
-------------------------------------------------------------------------------------
MATLAB Version 7.10 (R2010a)
Simulink Version 7.5 (R2010a)
Control System Toolbox Version 8.5 (R2010a)
Econometrics Toolbox Version 1.3 (R2010a)
Financial Toolbox Version 3.7.1 (R2010a)
Image Processing Toolbox Version 7.0 (R2010a)
Optimization Toolbox Version 5.0 (R2010a)
Signal Processing Blockset Version 7.0 (R2010a)
Signal Processing Toolbox Version 6.13 (R2010a)
Statistics Toolbox Version 7.3 (R2010a)
Symbolic Math Toolbox Version 5.4 (R2010a)
So obviously all Toolboxes are installed. The Econometrics Toolbox is quite large with lots of .m files in different folders and subfolders, all within the Matlab installation folder.
But my working folder is different! Do I have to work within the Toolbox folder to have access to all the .m files? Or do I have to copy the .m files I need from the Toolbox into my working folder?
Thanks in advance!
Karl
  3 件のコメント
Karl-Martin
Karl-Martin 2014 年 12 月 9 日
編集済み: Karl-Martin 2014 年 12 月 9 日
When I type:
>> which garch
I get:
'garch' not found.
The Toolboxes are located in the Matlab installation folder, I did not moved them. You´re right, garch is not a function, it is a class used to specify a model as an input argument. I am sure the syntax is valid, it is taken from:
Adam
Adam 2014 年 12 月 9 日
編集済み: Adam 2014 年 12 月 9 日
Yes, the syntax looks fine, but you seem to have lost that toolbox from your path, as indicated by the which function result.
Although, that is an R2014a help link...

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

採用された回答

Guillaume
Guillaume 2014 年 12 月 9 日
There are various garch* functions in the Econ toolbox of 2010a, but no garch itself, according to the documentation.
You probably could have checked that yourself by typing
docsearch garch
at the comment prompt of your matlab 2010a, or just navigating to the help page of the toolbox.

その他の回答 (1 件)

Adam
Adam 2014 年 12 月 9 日
編集済み: Adam 2014 年 12 月 9 日
First you need to check if this class exists in your version. I suspect it does not since R2010a is quite old and class-based implementations of Matlab builtin functionality have been quite recently expanding.
If it is in the R2010a version then do the following, but I suspect it is not as it is highly unlikely you have lost the toolbox from your path.
Locate the toolbox root folder and add this to your path, either using the addpath function or simpler by finding clicking on "Add Path" in the main Matlab UI and click 'Save' to ensure it stays there beyond the current session.
I'm not entirely sure where "Add Path" is located in R2010a, but it should be somewhere visible.

カテゴリ

Help Center および File ExchangeGARCH Model についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by