https://se.mathworks.com/help/fininst/assetbybls.html
assetbybls - Determine price of asset-or-nothing digital options using Black-Scholes model - MATLAB
This MATLAB function computes asset-or-nothing European digital options using the Black-Scholes option pricing model.