|
Last change
on this file since 19001 was 15771, checked in by Mathieu Morlighem, 12 years ago |
|
CHG: Diagnostic is now Stressbalance
|
|
File size:
439 bytes
|
| Line | |
|---|
| 1 | function Jstruct=MisfitDeinterlace(misfit,type)
|
|---|
| 2 | %MISFITDEINTERLACE - deinterlace misfits that are mixed together, using type.
|
|---|
| 3 | %
|
|---|
| 4 | % Usage:
|
|---|
| 5 | % Jstruct=MisfitDeinterlace(misfit,type)
|
|---|
| 6 | %
|
|---|
| 7 | % Example:
|
|---|
| 8 | % Jstruct=MisfitDeinterlace(md.results.stressbalance.J,md.fit)
|
|---|
| 9 | %
|
|---|
| 10 | %
|
|---|
| 11 | Jstruct=struct();
|
|---|
| 12 |
|
|---|
| 13 | count=1;
|
|---|
| 14 | for i=0:max(type),
|
|---|
| 15 | pos=find(type==i);
|
|---|
| 16 | if length(pos),
|
|---|
| 17 | Jstruct(count).type=i;
|
|---|
| 18 | Jstruct(count).J=misfit(pos);
|
|---|
| 19 | count=count+1;
|
|---|
| 20 | end
|
|---|
| 21 | end
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.