Firstly, your time problem is that your A and B are the vectors of all points and you're plotting the whole thing every time by referencing the arrays without subscripting. So you have length(A)^2 lines instead of just length(A).
A =[X1(:) X2(:)].'; B =[Y1(:) Y2(:)].';
w=round((width*5)/(max(width)));
figure
hL=plot(A,B);
set(hL,{'LineWidth'},num2cell(w(:)))
As noted, there needs be a definition of the variable width on RHS of the above...
0 Comments
Sign in to comment.