Hello,
I want to create an array (not vector) of linearly space points from a vector of starting and ending points. For example, I want to do the equivalent of,
go = [1;2;3]; %starting point
st = [2;3;4]; %ending points
nGo = length(go); %number of starting points
nPoints = 10; %number of points in each row
for iGo = 1:nGoA(iGo,:) = linspace(go,st,nPoints); %create array of linearly spaced rows
end
The problem is that the number of start points in on the order of 10000 and it is part of a fitting routine. So, I need the creation of this matrix to be as efficient as possible using minimal loops. Any suggestions?
Best Answer