I already asked this question before but it is really important to have an answer since the last answer i got wasn't helpful.
i will post the whole code:
f=find(vr(:,1)==i); vr indexes are from 1 to 235 but vr is 11000 rows and 0 columns
lamda=(vr(f,3)./vr(f,2));% range between 20 and 30
index1=find(lamda>=low & lamda<=high);
x(1,i)=sqrt((vr(f(1,1),8)-vr(f(1,1),6))^2 + (vr(f(1,1),9)-vr(f(1,1),7))^2);%x here is the length for each path
reference(1,i)=sqrt((vr(f(1,1),6))^2 + (vr(f(1,1),7)^2));
path1=find(x>=59 & x<=61); path2=find(x>=79 & x<=81);
% For low=20
for j=1:47 %path1
% plot([ p1(1,j) p2(1,j)], [p1(2,j) p2(2,j)])
plot3([ p1(1,j) p2(1,j)], [p1(2,j) p2(2,j)],[normalized(1,path1(1,j)),normalized(1,path1(1,j))],'Linewidth',1);
how can i specify the color of the line plotted by joining the 2 points p1 and p2 according to its corresponding velocity from matrix 'normalized' OR 'averageV'
the averageV could contain velocity as NaN or between 400 and 1200 and after knowing the min and max, the color should be distributed between them (yellow to blue for example) and each velocity corresponds to a color. is that possible ? because it's been 3 months and it didnt work so maybe it's not possible to do that in matlab?