vector-valued function element as function handle
显示 更早的评论
Dear all,
I guess I have a relatively simple problem, but I could not find any solution online. The built-in Matlab function
[AssetPrice,OptionValue] = binprice(Price,Strike,Rate,Time,Increment,Volatility,Flag)
generates the two outputs AssetPrice and OptionValue. The first is a matrix the second a scalar. I need the scalar only and I would like to make it as a function of one specific variable, i.e.
[~,OptionValue] = @(Volatility) binprice(Price,Strike,Rate,Time,Increment,Volatility,Flag)
being all the other inputs known. However, defined in this way I get the error "The expression cannot be assigned to multiple values". If the function binprice would return only one output (instead of two), the previous syntax would work.
How do you overcome this problem?
Thank you,
F
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 ARM Cortex-A Processors 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!