

%%%%%%%%%%%%%
%
% Kaj Johnson, Sept, 2000
%
% I altered plotpatchslip2(pm,slip,nve) to plot the patched fault surfaces in
% 3-D. This was designed to plot 4 faults surfaces. It must be slightly altered
% to plot more or less than 4 faults.
%
%
% Input:
%	pm = patchmodel (dislocation parameters)
%	pm(:,1) = length;
%	pm(:,2) = width;
%	pm(:,3) = depth;
%	pm(:,4) = dip;
%	pm(:,5) = strike;
%	pm(:,6) = East Offset;
%	pm(:,7) = North Offset;
%	slip = slip values
%	nve  = number of vertical elements
%


%net slip vector
ns=sqrt(s(1:length(s)/2).^2+s(length(s)/2+1:length(s)).^2);
plotpatchslip4
hold on
slipvects4(s,nve1,Lap,pm,pm1,pm2,pm3,pm4, s(1:size(Lap,1)), s(size(Lap,1)+1:end),nve1,faults,G11,G21,G31,G41,G12,G22,G32,G42)
 hold on
   hypo=[18.9473  -41.5610 -8];
            
   plot3(hypo(2),-hypo(1),hypo(3),'*')
   
   axis equal
   axis([-80 10 -60 10 -20 10])