I have these two points:
vx1=-8;
vy1=8;
vz1=7;
vx2=-7;
vy2=9;
vz2=9;
line([vx1 ,vx2],[vy1 ,vy2],[vz1 ,vz2]);
Now it will give me a line and I wanna extend it to the graph limits in x,y,and z... Note that I have many lines in this domain.
You can inspect the limits of the graph by doing
hline = line([vx1 ,vx2],[vy1 ,vy2],[vz1 ,vz2]);
hline.Parent.XLim
hline.Parent.YLim
etc
but it could be easier to change the graph limits to the maximum/minimum of your line in each dimension. You may use the commands xlim, ylim, zlim
xlim([-8 8]);
ylim([8 9]);
zlim([7 9]);
If you have several lines, find the min/max of each dimension and use that values for the xlim function.