MATLAB: Does the function give no outputs

functionoutput

function [A]=AccGold()
n = 4;
while Gold(n)-Gold(n-1) > 0.00000001
n = n+1;
A = Gold(n)
end
end
I want to find the first value of Gold(n)-Gold(n-1) such that it is < 0.0000001

Best Answer

If the condition is immediately false you never assign to A.
Related Question