As I've already explained, the name of a variable is completely uninteeresting.
A variable is built from internal variables which have indicies, and these will be associated with values when a problem is solved
yalmip('clear');
banana = sdpvar(1);getvariables(banana)
apple = sdpvar(1);getvariables(apple)
optimize([],(apple-4)^2+(banana-7)^2)
value(recover(1))
value(recover(2))