From 028ab27dc1ad4b1e279d87bae042bdf4505d54eb Mon Sep 17 00:00:00 2001 From: treecity Date: Thu, 17 Nov 2011 23:37:39 +0000 Subject: [PATCH] [src] plotMark Update git-svn-id: https://drops.fb12.tu-berlin.de/svn/bacc/trunk@69 26120e32-c555-405d-b3e1-1f783fb42516 --- src/plotMark.m | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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; -- 2.47.3