필터 지우기
필터 지우기

Crank-Nicolson finite difference method - Error: Function definitions are not permitted in this context.

조회 수: 1 (최근 30일)
ive copied the codes for Crank-Nicolson finite difference method, but it wont run and keeps showing this error msg 'Error: Function definitions are not permitted in this context.', any idea to fix this? thx guys :)
*function oPrice = finDiffCN(X,S0,r,sig,Svec,tvec,oType)
|
Error: Function definitions are not permitted in this context.*
ooo and one more thing, if it says - undefined function 'finDiffCN' for input arguments of type 'double'- how to fix it? thx!

답변 (1개)

Titus Edelhofer
Titus Edelhofer 2015년 6월 16일
You need to save the code to a file, then call it ...
Titus
  댓글 수: 1
Romenimo Carlos Cutana
Romenimo Carlos Cutana 2022년 3월 29일
Greetings. I hope you a doing great. I am facing a problem with the same code, it say that: not enough input arguments.
I don't know if you can help me.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by