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 | |
---|
1 | function results=parseresultsfromdisk(filename)
|
---|
2 | %PARSERESULTSFROMDISK - ...
|
---|
3 | %
|
---|
4 | % Usage:
|
---|
5 | % results=parseresultsfromdisk(filename)
|
---|
6 |
|
---|
7 | %Open file
|
---|
8 | fid=fopen(filename,'rb');
|
---|
9 | if(fid==-1),
|
---|
10 | error(['loadresultsfromdisk error message: could not open ',filename,' for binary reading']);
|
---|
11 | end
|
---|
12 | results=struct();
|
---|
13 |
|
---|
14 | %Read fields until the end of the file.
|
---|
15 | result=ReadData(fid);
|
---|
16 | while ~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 |
|
---|
28 | end
|
---|
29 |
|
---|
30 | %process patch if necessary
|
---|
31 | results=MatlabProcessPatch(results);
|
---|
32 |
|
---|
33 | fclose(fid);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.