I havent used Matlab for a while and was never really good at it. I need your help
How to terminate the function, as soon as NL reaches the number 1?
I think i have to put the 'if' and 'return' above the function but then Matlab tells me, that it doesnt know NL yet.
What am I doing wrong?
function NL = NLDestillationsblase(x, x0, Omega1) NL = (x/x0).^(1./(Omega1-1)).*((1-x0)./(1-x)).^(Omega1./(Omega1-1)) if NL >= 1 return end end
Best Answer