This works. Example is below. Can you provide the code for getting Adiff? Are you creating Xi,Yi,Zi first and using them to create Adiff?
>> A = sym('A%d%d',[3 3])
V = A(1,:)
values = randi(100,1,3)
subs(A,V,values)
A =
[ A11, A12, A13]
[ A21, A22, A23]
[ A31, A32, A33]
V =
[ A11, A12, A13]
values =
15 43 92
ans =
[ 15, 43, 92]
[ A21, A22, A23]
[ A31, A32, A33]