% Implied Vol calculation, using the Black-Scholes call function BS_call.m
function sig_imp = impvol(price,stock,strike,r,texp)
sig_imp = fzero(@BS,0.5);
function y = BS(x)
y = BS_call(stock,strike,r,x(1),texp) - price;
end
end