From: treecity Date: Thu, 17 Nov 2011 23:37:39 +0000 (+0000) Subject: [src] plotMark Update X-Git-Url: https://git.leopard-lacewing.eu/?a=commitdiff_plain;h=028ab27dc1ad4b1e279d87bae042bdf4505d54eb;p=bacc.git [src] plotMark Update git-svn-id: https://drops.fb12.tu-berlin.de/svn/bacc/trunk@69 26120e32-c555-405d-b3e1-1f783fb42516 --- diff --git a/src/plotMark.m b/src/plotMark.m index 26eb9db..a19cae8 100644 --- a/src/plotMark.m +++ b/src/plotMark.m @@ -3,8 +3,14 @@ function plotMark(ele,coordinates,elements) hold on; disp 'Plot Updated' for idx = ele - current = sum(coordinates(elements(idx,[2,4])',:),1)/2; - scatter3(current(1),current(2),current(3),'xg'); + if(length(idx)==1) + current = sum(coordinates(elements(idx,[2,4])',:),1)/2; + scatter3(current(1),current(2),current(3),'xg'); + else + current= [sum(coordinates(elements(idx(1),[2,4])',:),1)/2; ... + sum(coordinates(elements(idx(2),[2,4])',:),1)/2]; + plot3(current(:,1),current(:,2),current(:,3),'g'); + end end hold off;