M A 0 Newbie Poster

Hello,

I am trying to create a vector in MATLAB which starts at exactly point 'a' and ends at point 'b'. But it should not extend beyond these points. At the moment I am doing as below:

a = [0 0];
b = [0 10];
syms t
eq1 = a + t*(b-a);

But this way line from 'a' to 'b' exceeds these points and keeps on going in direction 'b-a'

Can anyone please help me as how to define a vector starting exactly at 'a' and ending at 'b' and not running after it. Because I need to intersect this vector with another line. I would be highly grateful if someone will help me :)