Conversion to double from function_handle is not possible
显示 更早的评论
Hi, I'm new to Matlab and I got this error while trying to write down a function.
Can someone help me understanding where is the problem in my code?
function [errors] = first_fun(market_vol,strike_prices,ExerciseDates)
n = size(market_vol,2);
m = size(market_vol,1);
errors = zeros (n);
for j = 1:n
for i = 1:m
errors(i,j) = @(X) market_vol(i,j) - blackvolbysabr(X(1),Beta,X(2),X(3),Settle,ExerciseDates{j},ForwardValue,strike_prices(i));
end
end
end
Thanks
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!