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!