
teste
T=SHM(:,:,1,1);
   P(:,:,1) = T * P0;
   h(1,1)=fill3(P(1,:,1),P(2,:,1),P(3,:,1), 'g');
   axis equal;
   axis([0 25 0 25 -5 5 ])
   
for i=2:size(SHM,4)
   T=SHM(:,:,1,i);
   P(:,:,i) = T * P0;
   h(1,i)=fill3(P(1,:,i),P(2,:,i),P(3,:,i), 'g');
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   pause(0.001)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

for j=2:size(SHM,3)
    T=SHM(:,:,j,1);
    P1 = T * P0;
    set(h(1,1),'XData',P1(1,:))
    set(h(1,1),'YData',P1(2,:))
    set(h(1,1),'ZData',P1(3,:))
   
    for i=2:size(SHM,4)   
        T=SHM(:,:,j,i);
        P1 = T * P1;
        set(h(1,i),'XData',P1(1,:))
        set(h(1,i),'YData',P1(2,:))
        set(h(1,i),'ZData',P1(3,:))   
    end
    pause(0.001)
end
