Last change
on this file since 13395 was 13395, checked in by Mathieu Morlighem, 12 years ago |
merged trunk-jpl and trunk for revision 13393
|
File size:
544 bytes
|
Line | |
---|
1 | function metric=MergeMetrics(metric1,metric2)
|
---|
2 |
|
---|
3 | M1xx=metric1(:,1); M1xy=metric1(:,2); M1yy=metric1(:,3);
|
---|
4 | M1lambda1=0.5*((M1xx+M1yy)+sqrt(4*M1xy.^2+(M1xx-M1yy).^2));
|
---|
5 | M1lambda2=0.5*((M1xx+M1yy)-sqrt(4*M1xy.^2+(M1xx-M1yy).^2));
|
---|
6 | lambda1=min(M1lambda1,M1lambda2);
|
---|
7 |
|
---|
8 | M2xx=metric1(:,1); M2xy=metric1(:,2); M2yy=metric1(:,3);
|
---|
9 | M2lambda1=0.5*((M2xx+M2yy)+sqrt(4*M2xy.^2+(M2xx-M2yy).^2));
|
---|
10 | M2lambda2=0.5*((M2xx+M2yy)-sqrt(4*M2xy.^2+(M2xx-M2yy).^2));
|
---|
11 | lambda2=min(M2lambda2,M2lambda2);
|
---|
12 |
|
---|
13 | metric=metric1;
|
---|
14 | pos=find(lambda2<lambda1);
|
---|
15 | metric(pos,:)=metric2(pos,:);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.