MATLAB: How to calculate the distance

calculate the distance

I have table B as given bellow. I have another point for example A=[100 111 80 120]. I want to calculate the euclidean distance between A and the columns (fourth, fifth, sixth and seventh) of B for each row.
B=
0 1 0 153 119 97 148
0 1 0 148 122 98 149
0 1 0 163 126 95 150
0 1 0 188 150 118 178

Best Answer

distmat = B(:,4:7)-repmat(A,4,1);
dist = vecnorm(distmat.')