MATLAB: Error with Matlab Function

error

I got this error :
Output argument "AB" (and maybe others) not assigned during call to
I would be greatly appreciated for your assistance,

Best Answer

You wrote a function with the variable name in the definition line but never assigned a RHS to it.
SOTOO
function ab = yourfunctionname(x)
% does what it does
z=x.^1.5;
end
As is easily seen, ab is never defined. ( z should have been ab or vice versa). Fix the similar problem appropriately in your function.