j*******d 发帖数: 55 | 1 【 以下文字转载自 EE 讨论区 】
发信人: JohnSteed (Mrs Peel, Mrs Emma Peel), 信区: EE
标 题: about MatLab programming
发信站: BBS 未名空间站 (Mon Nov 12 15:40:26 2007)
Here is a low-level question from a Matlab rookie.
I wanna write a function having a few arguments, one or two of these
arguments have to be functions, neither number, nor string.
Basically, the arguments are functions defined by users; I write a MatLab
program(function) that works for these user-defined functions.
How can I implement the function in MatLab | r*********e 发帖数: 80 | 2 I think you must have specified values, whatever format, as parameters of a
function.
So if mu are function of S and T, you can call function mu first, store and
feed the returned value as parameter of function SDE.
maybe f(g(x)) type also work, if g(x) returns a value. | j*******d 发帖数: 55 | 3 Thanks. But the puzzle is that the user-defined function could be anything:
uSt, or sigma*sqrt(St) and so on...
for each different input function, I have to change the codes (the codes
used to define the function) accordingly?
a
and
【在 r*********e 的大作中提到】 : I think you must have specified values, whatever format, as parameters of a : function. : So if mu are function of S and T, you can call function mu first, store and : feed the returned value as parameter of function SDE. : maybe f(g(x)) type also work, if g(x) returns a value.
| m****y 发帖数: 92 | 4 use function handles ba?
【 以下文字转载自 EE 讨论区 】
发信人: JohnSteed (Mrs Peel, Mrs Emma Peel), 信区: EE
标 题: about MatLab programming
发信站: BBS 未名空间站 (Mon Nov 12 15:40:26 2007)
Here is a low-level question from a Matlab rookie.
I wanna write a function having a few arguments, one or two of these
arguments have to be functions, neither number, nor string.
Basically, the arguments are functions defined by users; I write a MatLab
program(function) that works for these user-defined functions.
How can I implem
【在 j*******d 的大作中提到】 : 【 以下文字转载自 EE 讨论区 】 : 发信人: JohnSteed (Mrs Peel, Mrs Emma Peel), 信区: EE : 标 题: about MatLab programming : 发信站: BBS 未名空间站 (Mon Nov 12 15:40:26 2007) : Here is a low-level question from a Matlab rookie. : I wanna write a function having a few arguments, one or two of these : arguments have to be functions, neither number, nor string. : Basically, the arguments are functions defined by users; I write a MatLab : program(function) that works for these user-defined functions. : How can I implement the function in MatLab
| j*******d 发帖数: 55 | 5 对. 我只能用function handles,一个主程序,调用一个涵数, 用户输入韩数在主程序里
可以任意修改. 谢谢.
【在 m****y 的大作中提到】 : use function handles ba? : : 【 以下文字转载自 EE 讨论区 】 : 发信人: JohnSteed (Mrs Peel, Mrs Emma Peel), 信区: EE : 标 题: about MatLab programming : 发信站: BBS 未名空间站 (Mon Nov 12 15:40:26 2007) : Here is a low-level question from a Matlab rookie. : I wanna write a function having a few arguments, one or two of these : arguments have to be functions, neither number, nor string. : Basically, the arguments are functions defined by users; I write a MatLab
|
|