Specifying drift and diffusion functions in SDE(financial toolbox)

1 回表示 (過去 30 日間)
kangkan Devchoudhury
kangkan Devchoudhury 2019 年 10 月 13 日
編集済み: kangkan Devchoudhury 2019 年 10 月 13 日
Hello I am trying to simulate the following base SDE model using the financial toolbox
where are independent weiner processes
I wrote the drift and diffusion functions in two separate matlab functions in two separate files
function F=drf(t,X)
f1=0.1*X(1);
f2=0.1*X(2)
F=transpose([f1 f2])
end
function G=diffu(t,X)
G=[0.1 0;0 0.1]
end
But when i tried to create the sde object, by calling obj=SDE(drf,diffu) i got the following error
''Drift rate must be a 'Drift' function or a function''. I am using Matlab 2018. As far as i can see, the functions are of the correct dimensionality. What is wrong?

回答 (0 件)

カテゴリ

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

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by