I just found the answer on my own. It's so funny that I didn't think this way.
I will leave an answer here for people like me 4 hours ago...
%R=A*T where R= reference points, T= target points
% 4 pointset of reference
r1 =[1 0 0]
r2 =[1 1 0]
r3 =[2 0 0]
r4 =[1 0 1]
% 4 pointset of target
t1 =[0 0 0]
t2 =[0 2 0]
t3 =[2 0 0]
t4 =[0 0 2]
%homogenous coordinate
R=[r1,1; r2,1; r3,1; r4,1]';
T=[t1,1; t2,1; t3,1; t4,1]';
%since R=A*T, A= R*inv(T) or just A=R/T (in MATLAB)
A=R/T
% Result :
% A =
%
% 0.5000 0 0 1.0000
% 0 0.5000 0 0
% 0 0 0.5000 0
% 0 0 0 1.0000
% computes twofold scaled, translated matrix well



