Changeset 14800
- Timestamp:
- 04/30/13 07:41:52 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/geometry/slope.m
r13008 r14800 1 function [sx,sy,s]=slope(md )1 function [sx,sy,s]=slope(md,surf) 2 2 %SLOPE - compute the surface slope 3 3 % 4 4 % Usage: 5 5 % [sx,sy,s]=slope(md) 6 % [sx,sy,s]=slope(md,md.results.TransientSolution(1).Surface) 6 7 7 8 %load some variables (it is much faster if the variab;es are loaded from md once for all) … … 18 19 end 19 20 21 if nargin==1, 22 surf=md.geometry.surface; 23 end 20 24 %compute nodal functions coefficients N(x,y)=alpha x + beta y + gamma 21 25 [alpha beta]=GetNodalFunctionsCoeff(index,x,y); 22 26 23 27 summation=[1;1;1]; 24 sx=( md.geometry.surface(index).*alpha)*summation;25 sy=( md.geometry.surface(index).*beta)*summation;28 sx=(surf(index).*alpha)*summation; 29 sy=(surf(index).*beta)*summation; 26 30 s=sqrt(sx.^2+sy.^2); 27 31
Note:
See TracChangeset
for help on using the changeset viewer.