-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfExportState.m
37 lines (24 loc) · 1 KB
/
fExportState.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
function [ output_args ] = fExportState(state)
%This function exports the state struct to text file for reading of the
%compiled C version of Tornado.
%
fname=('state.txt');
fid=fopen(fname,'w');
fprintf(fid,'%%Tornado exported state data. \n');
fprintf(fid,strcat(strcat('%%Date: ', date), '\n'));
fprintf(fid,'%%--------------------------------------------- \n');
fprintf(fid,'%6f \n',state.AS);
fprintf(fid,'%6f \n',state.alpha);
fprintf(fid,'%6f \n',state.betha);
fprintf(fid,'%6f \n',state.P);
fprintf(fid,'%6f \n',state.Q);
fprintf(fid,'%6f \n',state.R);
fprintf(fid,'%6f \n',state.rho);
fprintf(fid,'\n');
fprintf(fid,'%% End of file');
q=fclose(fid);
disp(' ')
disp(' File written to:')
disp(strcat(strcat(pwd,'\'),strcat(fname)));
disp(' ')
end