source: issm/trunk/src/m/model/parseresultsfromdisk.m@ 5901

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

Some modificiations on Qmu analysis

File size: 689 bytes
Line 
1function results=parseresultsfromdisk(filename)
2%PARSERESULTSFROMDISK - ...
3%
4% Usage:
5% results=parseresultsfromdisk(filename)
6
7%Open file
8fid=fopen(filename,'rb');
9if(fid==-1),
10 error(['loadresultsfromdisk error message: could not open ',filename,' for binary reading']);
11end
12results=struct();
13
14%Read fields until the end of the file.
15result=ReadData(fid);
16while ~isempty(result),
17
18 %Get time and step
19 results(result.step).step=result.step;
20 results(result.step).time=result.time;
21
22 %Add result
23 results(result.step).(result.fieldname)=result.field;
24
25 %read next result
26 result=ReadData(fid);
27
28end
29
30%process patch if necessary
31results=MatlabProcessPatch(results);
32
33fclose(fid);
Note: See TracBrowser for help on using the repository browser.