Hi everybody,
i have 2 array with different number of rows (with columns that indicate x, y and z):
A (3×3 duble)
2.5 6.6 9.5
1.6 6.6 2.8
2.6 0.9 1.8
B (4×3 duble)
2.4 6.7 9.8
2.6 6.9 7.8
2.9 7.7 5.8
3.4 8.8 4.8
I want to track the straight line which passes from all points of A to every single point of B. I made this script but it does not run:
[m,n]=size(B)
[o,p]=size(A)
STR=-20:.01:20;
for i = 1:m
C{i}=repmat(A(1:o,:),length(STR),1)'+((B(i,:))-A(1:o,:))'*STR;
end
How can i do it? Thank you!
Best Answer