You remembered to use element-wise division for ‘lambda’. You also need to use it for ‘m’:
v2=beta.*(y-delta)+1-exp(-p)+4.*sqrt(beta).*(sqrt(exp(-1./m))-sqrt(exp(-y./lambda)))
HERE ↑
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!