source: issm/trunk/src/m/utils/DataProcessing/MisfitDeinterlace.m@ 3221

Last change on this file since 3221 was 3221, checked in by Eric.Larour, 15 years ago

More aliaes.
MisfitDeinterlace: when running control methods with different fits,this will extract misfit for all fits.

File size: 436 bytes
Line 
1function 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.diagnostic.J,md.fit)
9%
10%
11Jstruct=struct();
12
13count=1;
14for 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
21end
Note: See TracBrowser for help on using the repository browser.