MATLAB: Problem in executing equations in while loop

using gt

while abs(subs(f,'V',V2))>exp(-10)
V1=V2;
g=subs(f,'V',V1);
gd=subs(fd,'V',V1);
gdd=subs(fdd,'V',V1);
V2=(V1-(g/gd));
end
there is a error:
??? Error using ==> sym.sym>notimplemented at 2514
Function 'gt' is not implemented for MuPAD symbolic objects.
Error in ==> sym.sym>sym.gt at 792
notimplemented('gt');
Error in ==> final at 51
while gt(abs(a),b)

Best Answer

After the value of V2 is substituted for the variable 'V' in f, the result you are getting is something that still contains at least one variable (or contains something that cannot be evaluated.) The symbolic result cannot be evaluated to a double precision number so it is left symbolic. Then you try to compare the absolute value of that symbolic value to 10, and that comparison fails.
For example, if f = V^2 + W^2 with V and W symbolic, then substituting in 7 for V would result in 49 + W^2, which is something that cannot be compared to 10 because the value of W is unknown.